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
78f9177d
Commit
78f9177d
authored
Mar 03, 2010
by
Justin Chevrier
Committed by
Alexandre Julliard
Mar 04, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Implement GdipSetImageAttributesRemapTable with updated test.
parent
74a3945b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
12 deletions
+28
-12
gdiplus_private.h
dlls/gdiplus/gdiplus_private.h
+7
-0
imageattributes.c
dlls/gdiplus/imageattributes.c
+14
-5
image.c
dlls/gdiplus/tests/image.c
+7
-7
No files found.
dlls/gdiplus/gdiplus_private.h
View file @
78f9177d
...
...
@@ -264,10 +264,17 @@ struct color_matrix{
ColorMatrix
graymatrix
;
};
struct
color_remap_table
{
BOOL
enabled
;
INT
mapsize
;
GDIPCONST
ColorMap
*
colormap
;
};
struct
GpImageAttributes
{
WrapMode
wrap
;
struct
color_key
colorkeys
[
ColorAdjustTypeCount
];
struct
color_matrix
colormatrices
[
ColorAdjustTypeCount
];
struct
color_remap_table
colorremaptables
[
ColorAdjustTypeCount
];
BOOL
gamma_enabled
[
ColorAdjustTypeCount
];
REAL
gamma
[
ColorAdjustTypeCount
];
};
...
...
dlls/gdiplus/imageattributes.c
View file @
78f9177d
...
...
@@ -204,14 +204,23 @@ GpStatus WINGDIPAPI GdipSetImageAttributesRemapTable(GpImageAttributes *imageAtt
ColorAdjustType
type
,
BOOL
enableFlag
,
UINT
mapSize
,
GDIPCONST
ColorMap
*
map
)
{
static
int
calls
;
TRACE
(
"(%p,%u,%i,%u,%p)
\n
"
,
imageAttr
,
type
,
enableFlag
,
mapSize
,
map
);
if
(
!
(
calls
++
)
)
FIXME
(
"not implemented
\n
"
)
;
if
(
!
imageAttr
||
type
>=
ColorAdjustTypeCount
)
return
InvalidParameter
;
return
NotImplemented
;
if
(
enableFlag
)
{
if
(
!
map
||
!
mapSize
)
return
InvalidParameter
;
imageAttr
->
colorremaptables
[
type
].
mapsize
=
mapSize
;
imageAttr
->
colorremaptables
[
type
].
colormap
=
map
;
}
imageAttr
->
colorremaptables
[
type
].
enabled
=
enableFlag
;
return
Ok
;
}
GpStatus
WINGDIPAPI
GdipSetImageAttributesThreshold
(
GpImageAttributes
*
imageAttr
,
...
...
dlls/gdiplus/tests/image.c
View file @
78f9177d
...
...
@@ -1760,28 +1760,28 @@ static void test_remaptable(void)
map
->
newColor
.
Argb
=
0xffff00ff
;
stat
=
GdipSetImageAttributesRemapTable
(
NULL
,
ColorAdjustTypeDefault
,
TRUE
,
1
,
map
);
todo_wine
expect
(
InvalidParameter
,
stat
);
expect
(
InvalidParameter
,
stat
);
stat
=
GdipCreateImageAttributes
(
&
imageattr
);
expect
(
Ok
,
stat
);
stat
=
GdipSetImageAttributesRemapTable
(
imageattr
,
ColorAdjustTypeDefault
,
TRUE
,
1
,
NULL
);
todo_wine
expect
(
InvalidParameter
,
stat
);
expect
(
InvalidParameter
,
stat
);
stat
=
GdipSetImageAttributesRemapTable
(
imageattr
,
ColorAdjustTypeCount
,
TRUE
,
1
,
map
);
todo_wine
expect
(
InvalidParameter
,
stat
);
expect
(
InvalidParameter
,
stat
);
stat
=
GdipSetImageAttributesRemapTable
(
imageattr
,
ColorAdjustTypeAny
,
TRUE
,
1
,
map
);
todo_wine
expect
(
InvalidParameter
,
stat
);
expect
(
InvalidParameter
,
stat
);
stat
=
GdipSetImageAttributesRemapTable
(
imageattr
,
ColorAdjustTypeDefault
,
TRUE
,
0
,
map
);
todo_wine
expect
(
InvalidParameter
,
stat
);
expect
(
InvalidParameter
,
stat
);
stat
=
GdipSetImageAttributesRemapTable
(
imageattr
,
ColorAdjustTypeDefault
,
FALSE
,
0
,
NULL
);
todo_wine
expect
(
Ok
,
stat
);
expect
(
Ok
,
stat
);
stat
=
GdipSetImageAttributesRemapTable
(
imageattr
,
ColorAdjustTypeDefault
,
TRUE
,
1
,
map
);
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