Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
42472477
Commit
42472477
authored
Apr 15, 2010
by
Vincent Povirk
Committed by
Alexandre Julliard
Apr 16, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Implement color remapping.
parent
bb9c1878
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
2 deletions
+32
-2
graphics.c
dlls/gdiplus/graphics.c
+31
-1
image.c
dlls/gdiplus/tests/image.c
+1
-1
No files found.
dlls/gdiplus/graphics.c
View file @
42472477
...
...
@@ -1995,7 +1995,8 @@ GpStatus WINGDIPAPI GdipDrawImagePointsRect(GpGraphics *graphics, GpImage *image
else
return
NotImplemented
;
if
(
ptf
[
1
].
Y
!=
ptf
[
0
].
Y
||
ptf
[
2
].
X
!=
ptf
[
0
].
X
)
if
(
imageAttributes
||
ptf
[
1
].
Y
!=
ptf
[
0
].
Y
||
ptf
[
2
].
X
!=
ptf
[
0
].
X
)
use_software
=
1
;
else
if
(
graphics
->
image
&&
graphics
->
image
->
type
==
ImageTypeBitmap
)
{
...
...
@@ -2084,6 +2085,35 @@ GpStatus WINGDIPAPI GdipDrawImagePointsRect(GpGraphics *graphics, GpImage *image
GdipDeleteMatrix
(
dst_to_src
);
if
(
imageAttributes
)
{
if
(
imageAttributes
->
colorremaptables
[
ColorAdjustTypeBitmap
].
enabled
||
imageAttributes
->
colorremaptables
[
ColorAdjustTypeDefault
].
enabled
)
{
const
struct
color_remap_table
*
table
;
if
(
imageAttributes
->
colorremaptables
[
ColorAdjustTypeBitmap
].
enabled
)
table
=
&
imageAttributes
->
colorremaptables
[
ColorAdjustTypeBitmap
];
else
table
=
&
imageAttributes
->
colorremaptables
[
ColorAdjustTypeDefault
];
for
(
x
=
dst_area
.
left
;
x
<
dst_area
.
right
;
x
++
)
for
(
y
=
dst_area
.
top
;
y
<
dst_area
.
bottom
;
y
++
)
{
ARGB
*
src_color
;
src_color
=
(
ARGB
*
)(
data
+
stride
*
(
y
-
dst_area
.
top
)
+
sizeof
(
ARGB
)
*
(
x
-
dst_area
.
left
));
for
(
i
=
0
;
i
<
table
->
mapsize
;
i
++
)
{
if
(
*
src_color
==
table
->
colormap
[
i
].
oldColor
.
Argb
)
{
*
src_color
=
table
->
colormap
[
i
].
newColor
.
Argb
;
break
;
}
}
}
}
}
stat
=
alpha_blend_pixels
(
graphics
,
dst_area
.
left
,
dst_area
.
top
,
data
,
dst_area
.
right
-
dst_area
.
left
,
dst_area
.
bottom
-
dst_area
.
top
,
stride
);
...
...
dlls/gdiplus/tests/image.c
View file @
42472477
...
...
@@ -1879,7 +1879,7 @@ static void test_remaptable(void)
stat
=
GdipBitmapGetPixel
(
bitmap2
,
0
,
0
,
&
color
);
expect
(
Ok
,
stat
);
todo_wine
ok
(
color_match
(
0xffff00ff
,
color
,
1
),
"Expected ffff00ff, got %.8x
\n
"
,
color
);
ok
(
color_match
(
0xffff00ff
,
color
,
1
),
"Expected ffff00ff, got %.8x
\n
"
,
color
);
GdipDeleteGraphics
(
graphics
);
GdipDisposeImage
((
GpImage
*
)
bitmap1
);
...
...
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