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
0c9991c5
Commit
0c9991c5
authored
Dec 18, 2009
by
Vincent Povirk
Committed by
Alexandre Julliard
Dec 21, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Implement GdipSetImageAttributesColorMatrix.
parent
70bdc43c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
14 deletions
+39
-14
gdiplus_private.h
dlls/gdiplus/gdiplus_private.h
+8
-0
imageattributes.c
dlls/gdiplus/imageattributes.c
+22
-5
image.c
dlls/gdiplus/tests/image.c
+9
-9
No files found.
dlls/gdiplus/gdiplus_private.h
View file @
0c9991c5
...
...
@@ -249,9 +249,17 @@ struct color_key{
ARGB
high
;
};
struct
color_matrix
{
BOOL
enabled
;
ColorMatrixFlags
flags
;
ColorMatrix
colormatrix
;
ColorMatrix
graymatrix
;
};
struct
GpImageAttributes
{
WrapMode
wrap
;
struct
color_key
colorkeys
[
ColorAdjustTypeCount
];
struct
color_matrix
colormatrices
[
ColorAdjustTypeCount
];
};
struct
GpFont
{
...
...
dlls/gdiplus/imageattributes.c
View file @
0c9991c5
...
...
@@ -89,15 +89,32 @@ GpStatus WINGDIPAPI GdipSetImageAttributesColorMatrix(GpImageAttributes *imageat
ColorAdjustType
type
,
BOOL
enableFlag
,
GDIPCONST
ColorMatrix
*
colorMatrix
,
GDIPCONST
ColorMatrix
*
grayMatrix
,
ColorMatrixFlags
flags
)
{
static
int
calls
;
TRACE
(
"(%p,%u,%i,%p,%p,%u)
\n
"
,
imageattr
,
type
,
enableFlag
,
colorMatrix
,
grayMatrix
,
flags
);
if
(
!
imageattr
||
!
colorMatrix
||
!
grayMatrix
)
if
(
!
imageattr
||
type
>=
ColorAdjustTypeCount
||
flags
>
ColorMatrixFlagsAltGray
)
return
InvalidParameter
;
if
(
!
(
calls
++
))
FIXME
(
"not implemented
\n
"
);
if
(
enableFlag
)
{
if
(
!
colorMatrix
)
return
InvalidParameter
;
return
NotImplemented
;
if
(
flags
==
ColorMatrixFlagsAltGray
)
{
if
(
!
grayMatrix
)
return
InvalidParameter
;
imageattr
->
colormatrices
[
type
].
graymatrix
=
*
grayMatrix
;
}
imageattr
->
colormatrices
[
type
].
colormatrix
=
*
colorMatrix
;
imageattr
->
colormatrices
[
type
].
flags
=
flags
;
}
imageattr
->
colormatrices
[
type
].
enabled
=
enableFlag
;
return
Ok
;
}
GpStatus
WINGDIPAPI
GdipSetImageAttributesWrapMode
(
GpImageAttributes
*
imageAttr
,
...
...
dlls/gdiplus/tests/image.c
View file @
0c9991c5
...
...
@@ -1125,7 +1125,7 @@ static void test_colormatrix(void)
stat
=
GdipSetImageAttributesColorMatrix
(
imageattr
,
ColorAdjustTypeDefault
,
TRUE
,
&
colormatrix
,
NULL
,
ColorMatrixFlagsDefault
);
todo_wine
expect
(
Ok
,
stat
);
expect
(
Ok
,
stat
);
stat
=
GdipSetImageAttributesColorMatrix
(
imageattr
,
ColorAdjustTypeDefault
,
TRUE
,
NULL
,
NULL
,
ColorMatrixFlagsDefault
);
...
...
@@ -1133,11 +1133,11 @@ static void test_colormatrix(void)
stat
=
GdipSetImageAttributesColorMatrix
(
imageattr
,
ColorAdjustTypeDefault
,
TRUE
,
&
colormatrix
,
&
graymatrix
,
ColorMatrixFlagsDefault
);
todo_wine
expect
(
Ok
,
stat
);
expect
(
Ok
,
stat
);
stat
=
GdipSetImageAttributesColorMatrix
(
imageattr
,
ColorAdjustTypeDefault
,
TRUE
,
&
colormatrix
,
NULL
,
ColorMatrixFlagsSkipGrays
);
todo_wine
expect
(
Ok
,
stat
);
expect
(
Ok
,
stat
);
stat
=
GdipSetImageAttributesColorMatrix
(
imageattr
,
ColorAdjustTypeDefault
,
TRUE
,
&
colormatrix
,
NULL
,
ColorMatrixFlagsAltGray
);
...
...
@@ -1145,29 +1145,29 @@ static void test_colormatrix(void)
stat
=
GdipSetImageAttributesColorMatrix
(
imageattr
,
ColorAdjustTypeDefault
,
TRUE
,
&
colormatrix
,
&
graymatrix
,
ColorMatrixFlagsAltGray
);
todo_wine
expect
(
Ok
,
stat
);
expect
(
Ok
,
stat
);
stat
=
GdipSetImageAttributesColorMatrix
(
imageattr
,
ColorAdjustTypeDefault
,
TRUE
,
&
colormatrix
,
&
graymatrix
,
3
);
todo_wine
expect
(
InvalidParameter
,
stat
);
expect
(
InvalidParameter
,
stat
);
stat
=
GdipSetImageAttributesColorMatrix
(
imageattr
,
ColorAdjustTypeCount
,
TRUE
,
&
colormatrix
,
&
graymatrix
,
ColorMatrixFlagsDefault
);
todo_wine
expect
(
InvalidParameter
,
stat
);
expect
(
InvalidParameter
,
stat
);
stat
=
GdipSetImageAttributesColorMatrix
(
imageattr
,
ColorAdjustTypeAny
,
TRUE
,
&
colormatrix
,
&
graymatrix
,
ColorMatrixFlagsDefault
);
todo_wine
expect
(
InvalidParameter
,
stat
);
expect
(
InvalidParameter
,
stat
);
stat
=
GdipSetImageAttributesColorMatrix
(
imageattr
,
ColorAdjustTypeDefault
,
FALSE
,
NULL
,
NULL
,
ColorMatrixFlagsDefault
);
todo_wine
expect
(
Ok
,
stat
);
expect
(
Ok
,
stat
);
/* Drawing a bitmap transforms the colors */
colormatrix
=
double_red
;
stat
=
GdipSetImageAttributesColorMatrix
(
imageattr
,
ColorAdjustTypeDefault
,
TRUE
,
&
colormatrix
,
NULL
,
ColorMatrixFlagsDefault
);
todo_wine
expect
(
Ok
,
stat
);
expect
(
Ok
,
stat
);
stat
=
GdipCreateBitmapFromScan0
(
1
,
1
,
0
,
PixelFormat32bppRGB
,
NULL
,
&
bitmap1
);
expect
(
Ok
,
stat
);
...
...
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