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
2b8b64f9
Commit
2b8b64f9
authored
May 22, 2013
by
Andrew Eikum
Committed by
Alexandre Julliard
May 22, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Implement GdipResetImageAttributes.
parent
2c6b5d33
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
81 additions
and
5 deletions
+81
-5
gdiplus.spec
dlls/gdiplus/gdiplus.spec
+1
-1
imageattributes.c
dlls/gdiplus/imageattributes.c
+17
-0
image.c
dlls/gdiplus/tests/image.c
+61
-4
gdiplusflat.h
include/gdiplusflat.h
+2
-0
No files found.
dlls/gdiplus/gdiplus.spec
View file @
2b8b64f9
...
...
@@ -455,7 +455,7 @@
455 stdcall GdipReleaseDC(ptr ptr)
456 stdcall GdipRemovePropertyItem(ptr long)
457 stdcall GdipResetClip(ptr)
458 st
ub GdipResetImageAttributes
458 st
dcall GdipResetImageAttributes(ptr long)
459 stdcall GdipResetLineTransform(ptr)
460 stdcall GdipResetPageTransform(ptr)
461 stdcall GdipResetPath(ptr)
...
...
dlls/gdiplus/imageattributes.c
View file @
2b8b64f9
...
...
@@ -270,3 +270,20 @@ GpStatus WINGDIPAPI GdipSetImageAttributesToIdentity(GpImageAttributes *imageAtt
return
NotImplemented
;
}
GpStatus
WINGDIPAPI
GdipResetImageAttributes
(
GpImageAttributes
*
imageAttr
,
ColorAdjustType
type
)
{
TRACE
(
"(%p,%u)
\n
"
,
imageAttr
,
type
);
if
(
!
imageAttr
||
type
>=
ColorAdjustTypeCount
)
return
InvalidParameter
;
memset
(
&
imageAttr
->
colorkeys
[
type
],
0
,
sizeof
(
imageAttr
->
colorkeys
[
type
]));
memset
(
&
imageAttr
->
colormatrices
[
type
],
0
,
sizeof
(
imageAttr
->
colormatrices
[
type
]));
memset
(
&
imageAttr
->
colorremaptables
[
type
],
0
,
sizeof
(
imageAttr
->
colorremaptables
[
type
]));
memset
(
&
imageAttr
->
gamma_enabled
[
type
],
0
,
sizeof
(
imageAttr
->
gamma_enabled
[
type
]));
memset
(
&
imageAttr
->
gamma
[
type
],
0
,
sizeof
(
imageAttr
->
gamma
[
type
]));
return
Ok
;
}
dlls/gdiplus/tests/image.c
View file @
2b8b64f9
...
...
@@ -2211,6 +2211,17 @@ static void test_colormatrix(void)
expect
(
Ok
,
stat
);
ok
(
color_match
(
0xeeff40cc
,
color
,
3
),
"expected 0xeeff40cc, got 0x%08x
\n
"
,
color
);
stat
=
GdipResetImageAttributes
(
imageattr
,
ColorAdjustTypeDefault
);
expect
(
Ok
,
stat
);
stat
=
GdipDrawImageRectRectI
(
graphics
,
(
GpImage
*
)
bitmap1
,
0
,
0
,
1
,
1
,
0
,
0
,
1
,
1
,
UnitPixel
,
imageattr
,
NULL
,
NULL
);
expect
(
Ok
,
stat
);
stat
=
GdipBitmapGetPixel
(
bitmap2
,
0
,
0
,
&
color
);
expect
(
Ok
,
stat
);
ok
(
color_match
(
0xff40ccee
,
color
,
1
),
"Expected ff40ccee, got %.8x
\n
"
,
color
);
GdipDeleteGraphics
(
graphics
);
GdipDisposeImage
((
GpImage
*
)
bitmap1
);
GdipDisposeImage
((
GpImage
*
)
bitmap2
);
...
...
@@ -2273,6 +2284,17 @@ static void test_gamma(void)
expect
(
Ok
,
stat
);
ok
(
color_match
(
0xff20ffff
,
color
,
1
),
"Expected ff20ffff, got %.8x
\n
"
,
color
);
stat
=
GdipResetImageAttributes
(
imageattr
,
ColorAdjustTypeDefault
);
expect
(
Ok
,
stat
);
stat
=
GdipDrawImageRectRectI
(
graphics
,
(
GpImage
*
)
bitmap1
,
0
,
0
,
1
,
1
,
0
,
0
,
1
,
1
,
UnitPixel
,
imageattr
,
NULL
,
NULL
);
expect
(
Ok
,
stat
);
stat
=
GdipBitmapGetPixel
(
bitmap2
,
0
,
0
,
&
color
);
expect
(
Ok
,
stat
);
ok
(
color_match
(
0xff80ffff
,
color
,
1
),
"Expected ff80ffff, got %.8x
\n
"
,
color
);
GdipDeleteGraphics
(
graphics
);
GdipDisposeImage
((
GpImage
*
)
bitmap1
);
GdipDisposeImage
((
GpImage
*
)
bitmap2
);
...
...
@@ -2604,6 +2626,17 @@ static void test_remaptable(void)
expect
(
Ok
,
stat
);
ok
(
color_match
(
0xffff00ff
,
color
,
1
),
"Expected ffff00ff, got %.8x
\n
"
,
color
);
stat
=
GdipResetImageAttributes
(
imageattr
,
ColorAdjustTypeDefault
);
expect
(
Ok
,
stat
);
stat
=
GdipDrawImageRectRectI
(
graphics
,
(
GpImage
*
)
bitmap1
,
0
,
0
,
1
,
1
,
0
,
0
,
1
,
1
,
UnitPixel
,
imageattr
,
NULL
,
NULL
);
expect
(
Ok
,
stat
);
stat
=
GdipBitmapGetPixel
(
bitmap2
,
0
,
0
,
&
color
);
expect
(
Ok
,
stat
);
ok
(
color_match
(
0xff00ff00
,
color
,
1
),
"Expected ff00ff00, got %.8x
\n
"
,
color
);
GdipDeleteGraphics
(
graphics
);
GdipDisposeImage
((
GpImage
*
)
bitmap1
);
GdipDisposeImage
((
GpImage
*
)
bitmap2
);
...
...
@@ -2661,19 +2694,43 @@ static void test_colorkey(void)
stat
=
GdipBitmapGetPixel
(
bitmap2
,
0
,
0
,
&
color
);
expect
(
Ok
,
stat
);
ok
(
color_match
(
0x00000000
,
color
,
1
),
"Expected
ffff00ff
, got %.8x
\n
"
,
color
);
ok
(
color_match
(
0x00000000
,
color
,
1
),
"Expected
00000000
, got %.8x
\n
"
,
color
);
stat
=
GdipBitmapGetPixel
(
bitmap2
,
0
,
1
,
&
color
);
expect
(
Ok
,
stat
);
ok
(
color_match
(
0x00000000
,
color
,
1
),
"Expected
ffff00ff
, got %.8x
\n
"
,
color
);
ok
(
color_match
(
0x00000000
,
color
,
1
),
"Expected
00000000
, got %.8x
\n
"
,
color
);
stat
=
GdipBitmapGetPixel
(
bitmap2
,
1
,
0
,
&
color
);
expect
(
Ok
,
stat
);
ok
(
color_match
(
0x00000000
,
color
,
1
),
"Expected
ffff00ff
, got %.8x
\n
"
,
color
);
ok
(
color_match
(
0x00000000
,
color
,
1
),
"Expected
00000000
, got %.8x
\n
"
,
color
);
stat
=
GdipBitmapGetPixel
(
bitmap2
,
1
,
1
,
&
color
);
expect
(
Ok
,
stat
);
ok
(
color_match
(
0xffffffff
,
color
,
1
),
"Expected ffff00ff, got %.8x
\n
"
,
color
);
ok
(
color_match
(
0xffffffff
,
color
,
1
),
"Expected ffffffff, got %.8x
\n
"
,
color
);
stat
=
GdipResetImageAttributes
(
imageattr
,
ColorAdjustTypeDefault
);
expect
(
Ok
,
stat
);
stat
=
GdipDrawImageRectRectI
(
graphics
,
(
GpImage
*
)
bitmap1
,
0
,
0
,
2
,
2
,
0
,
0
,
2
,
2
,
UnitPixel
,
imageattr
,
NULL
,
NULL
);
expect
(
Ok
,
stat
);
stat
=
GdipBitmapGetPixel
(
bitmap2
,
0
,
0
,
&
color
);
expect
(
Ok
,
stat
);
ok
(
color_match
(
0x20405060
,
color
,
1
),
"Expected 20405060, got %.8x
\n
"
,
color
);
stat
=
GdipBitmapGetPixel
(
bitmap2
,
0
,
1
,
&
color
);
expect
(
Ok
,
stat
);
ok
(
color_match
(
0x40506070
,
color
,
1
),
"Expected 40506070, got %.8x
\n
"
,
color
);
stat
=
GdipBitmapGetPixel
(
bitmap2
,
1
,
0
,
&
color
);
expect
(
Ok
,
stat
);
ok
(
color_match
(
0x60708090
,
color
,
1
),
"Expected 60708090, got %.8x
\n
"
,
color
);
stat
=
GdipBitmapGetPixel
(
bitmap2
,
1
,
1
,
&
color
);
expect
(
Ok
,
stat
);
ok
(
color_match
(
0xffffffff
,
color
,
1
),
"Expected ffffffff, got %.8x
\n
"
,
color
);
GdipDeleteGraphics
(
graphics
);
GdipDisposeImage
((
GpImage
*
)
bitmap1
);
...
...
include/gdiplusflat.h
View file @
2b8b64f9
...
...
@@ -458,6 +458,8 @@ GpStatus WINGDIPAPI GdipSetImageAttributesToIdentity(GpImageAttributes*,
ColorAdjustType
);
GpStatus
WINGDIPAPI
GdipSetImageAttributesWrapMode
(
GpImageAttributes
*
,
WrapMode
,
ARGB
,
BOOL
);
GpStatus
WINGDIPAPI
GdipResetImageAttributes
(
GpImageAttributes
*
,
ColorAdjustType
);
/* LinearGradientBrush */
GpStatus
WINGDIPAPI
GdipCreateLineBrush
(
GDIPCONST
GpPointF
*
,
GDIPCONST
GpPointF
*
,
...
...
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