Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
00dec58b
Commit
00dec58b
authored
Feb 05, 2010
by
Vincent Povirk
Committed by
Alexandre Julliard
Feb 15, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Convert formats that can't be drawn by gdi32 when drawing bitmaps.
parent
cf4ec6e8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
5 deletions
+15
-5
graphics.c
dlls/gdiplus/graphics.c
+15
-5
No files found.
dlls/gdiplus/graphics.c
View file @
00dec58b
...
...
@@ -1926,12 +1926,16 @@ GpStatus WINGDIPAPI GdipDrawImagePointsRect(GpGraphics *graphics, GpImage *image
else
return
NotImplemented
;
if
(
bitmap
->
format
==
PixelFormat32bppARGB
)
if
(
!
(
bitmap
->
format
==
PixelFormat16bppRGB555
||
bitmap
->
format
==
PixelFormat24bppRGB
||
bitmap
->
format
==
PixelFormat32bppRGB
||
bitmap
->
format
==
PixelFormat32bppPARGB
))
{
BITMAPINFOHEADER
bih
;
BYTE
*
temp_bits
;
PixelFormat
dst_format
;
/* we
need a bitmap with premultiplied alpha
*/
/* we
can't draw a bitmap of this format directly
*/
hdc
=
CreateCompatibleDC
(
0
);
temp_hdc
=
1
;
temp_bitmap
=
1
;
...
...
@@ -1951,8 +1955,14 @@ GpStatus WINGDIPAPI GdipDrawImagePointsRect(GpGraphics *graphics, GpImage *image
hbitmap
=
CreateDIBSection
(
hdc
,
(
BITMAPINFO
*
)
&
bih
,
DIB_RGB_COLORS
,
(
void
**
)
&
temp_bits
,
NULL
,
0
);
convert_32bppARGB_to_32bppPARGB
(
bitmap
->
width
,
bitmap
->
height
,
temp_bits
,
bitmap
->
width
*
4
,
bitmap
->
bits
,
bitmap
->
stride
);
if
(
bitmap
->
format
&
(
PixelFormatAlpha
|
PixelFormatPAlpha
))
dst_format
=
PixelFormat32bppPARGB
;
else
dst_format
=
PixelFormat32bppRGB
;
convert_pixels
(
bitmap
->
width
,
bitmap
->
height
,
bitmap
->
width
*
4
,
temp_bits
,
dst_format
,
bitmap
->
stride
,
bitmap
->
bits
,
bitmap
->
format
,
bitmap
->
image
.
palette_entries
);
}
else
{
...
...
@@ -1967,7 +1977,7 @@ GpStatus WINGDIPAPI GdipDrawImagePointsRect(GpGraphics *graphics, GpImage *image
old_hbm
=
SelectObject
(
hdc
,
hbitmap
);
}
if
(
bitmap
->
format
==
PixelFormat32bppARGB
||
bitmap
->
format
==
PixelFormat32bppPARGB
)
if
(
bitmap
->
format
&
(
PixelFormatAlpha
|
PixelFormatPAlpha
)
)
{
BLENDFUNCTION
bf
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment