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
87f8e560
Commit
87f8e560
authored
Jul 17, 2012
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jul 17, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Pass complete palette info to convert_pixels().
parent
a46c1f78
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
6 deletions
+8
-6
gdiplus_private.h
dlls/gdiplus/gdiplus_private.h
+1
-1
graphics.c
dlls/gdiplus/graphics.c
+1
-1
image.c
dlls/gdiplus/image.c
+6
-4
No files found.
dlls/gdiplus/gdiplus_private.h
View file @
87f8e560
...
...
@@ -120,7 +120,7 @@ extern void convert_32bppARGB_to_32bppPARGB(UINT width, UINT height,
extern
GpStatus
convert_pixels
(
INT
width
,
INT
height
,
INT
dst_stride
,
BYTE
*
dst_bits
,
PixelFormat
dst_format
,
INT
src_stride
,
const
BYTE
*
src_bits
,
PixelFormat
src_format
,
ARGB
*
src_
palette
)
DECLSPEC_HIDDEN
;
INT
src_stride
,
const
BYTE
*
src_bits
,
PixelFormat
src_format
,
ColorPalette
*
palette
)
DECLSPEC_HIDDEN
;
struct
GpPen
{
UINT
style
;
...
...
dlls/gdiplus/graphics.c
View file @
87f8e560
...
...
@@ -3274,7 +3274,7 @@ GpStatus WINGDIPAPI GdipDrawImagePointsRect(GpGraphics *graphics, GpImage *image
convert_pixels
(
bitmap
->
width
,
bitmap
->
height
,
bitmap
->
width
*
4
,
temp_bits
,
dst_format
,
bitmap
->
stride
,
bitmap
->
bits
,
bitmap
->
format
,
bitmap
->
image
.
palette
?
bitmap
->
image
.
palette
->
Entries
:
NULL
);
bitmap
->
image
.
palette
);
}
else
{
...
...
dlls/gdiplus/image.c
View file @
87f8e560
...
...
@@ -501,7 +501,8 @@ GpStatus WINGDIPAPI GdipBitmapSetPixel(GpBitmap* bitmap, INT x, INT y,
GpStatus
convert_pixels
(
INT
width
,
INT
height
,
INT
dst_stride
,
BYTE
*
dst_bits
,
PixelFormat
dst_format
,
INT
src_stride
,
const
BYTE
*
src_bits
,
PixelFormat
src_format
,
ARGB
*
src_palette
)
INT
src_stride
,
const
BYTE
*
src_bits
,
PixelFormat
src_format
,
ColorPalette
*
palette
)
{
INT
x
,
y
;
...
...
@@ -518,9 +519,10 @@ GpStatus convert_pixels(INT width, INT height,
for (x=0; x<width; x++) \
for (y=0; y<height; y++) { \
BYTE index; \
BYTE *color; \
ARGB argb; \
BYTE *color = (BYTE *)&argb; \
getpixel_function(&index, src_bits+src_stride*y, x); \
color = (BYTE*)(&src_palette[index])
; \
argb = (palette && index < palette->Count) ? palette->Entries[index] : 0
; \
setpixel_function(color[2], color[1], color[0], color[3], dst_bits+dst_stride*y, x); \
} \
return Ok; \
...
...
@@ -1012,7 +1014,7 @@ GpStatus WINGDIPAPI GdipBitmapLockBits(GpBitmap* bitmap, GDIPCONST GpRect* rect,
lockeddata
->
Stride
,
lockeddata
->
Scan0
,
format
,
bitmap
->
stride
,
bitmap
->
bits
+
bitmap
->
stride
*
act_rect
.
Y
+
PIXELFORMATBPP
(
bitmap
->
format
)
*
act_rect
.
X
/
8
,
bitmap
->
format
,
bitmap
->
image
.
palette
?
bitmap
->
image
.
palette
->
Entries
:
NULL
);
bitmap
->
format
,
bitmap
->
image
.
palette
);
if
(
stat
!=
Ok
)
{
...
...
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