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
74a3945b
Commit
74a3945b
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/test: Add GdipSetImageAttributesRemapTable test and fix typo.
parent
86292d1d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
67 additions
and
1 deletion
+67
-1
image.c
dlls/gdiplus/tests/image.c
+66
-0
gdipluscolormatrix.h
include/gdipluscolormatrix.h
+1
-1
No files found.
dlls/gdiplus/tests/image.c
View file @
74a3945b
...
@@ -1745,6 +1745,71 @@ static void test_rotateflip(void)
...
@@ -1745,6 +1745,71 @@ static void test_rotateflip(void)
GdipDisposeImage
(
bitmap
);
GdipDisposeImage
(
bitmap
);
}
}
static
void
test_remaptable
(
void
)
{
GpStatus
stat
;
GpImageAttributes
*
imageattr
;
GpBitmap
*
bitmap1
,
*
bitmap2
;
GpGraphics
*
graphics
;
ARGB
color
;
ColorMap
*
map
;
map
=
GdipAlloc
(
sizeof
(
ColorMap
));
map
->
oldColor
.
Argb
=
0xff00ff00
;
map
->
newColor
.
Argb
=
0xffff00ff
;
stat
=
GdipSetImageAttributesRemapTable
(
NULL
,
ColorAdjustTypeDefault
,
TRUE
,
1
,
map
);
todo_wine
expect
(
InvalidParameter
,
stat
);
stat
=
GdipCreateImageAttributes
(
&
imageattr
);
expect
(
Ok
,
stat
);
stat
=
GdipSetImageAttributesRemapTable
(
imageattr
,
ColorAdjustTypeDefault
,
TRUE
,
1
,
NULL
);
todo_wine
expect
(
InvalidParameter
,
stat
);
stat
=
GdipSetImageAttributesRemapTable
(
imageattr
,
ColorAdjustTypeCount
,
TRUE
,
1
,
map
);
todo_wine
expect
(
InvalidParameter
,
stat
);
stat
=
GdipSetImageAttributesRemapTable
(
imageattr
,
ColorAdjustTypeAny
,
TRUE
,
1
,
map
);
todo_wine
expect
(
InvalidParameter
,
stat
);
stat
=
GdipSetImageAttributesRemapTable
(
imageattr
,
ColorAdjustTypeDefault
,
TRUE
,
0
,
map
);
todo_wine
expect
(
InvalidParameter
,
stat
);
stat
=
GdipSetImageAttributesRemapTable
(
imageattr
,
ColorAdjustTypeDefault
,
FALSE
,
0
,
NULL
);
todo_wine
expect
(
Ok
,
stat
);
stat
=
GdipSetImageAttributesRemapTable
(
imageattr
,
ColorAdjustTypeDefault
,
TRUE
,
1
,
map
);
todo_wine
expect
(
Ok
,
stat
);
stat
=
GdipCreateBitmapFromScan0
(
1
,
1
,
0
,
PixelFormat32bppRGB
,
NULL
,
&
bitmap1
);
expect
(
Ok
,
stat
);
stat
=
GdipCreateBitmapFromScan0
(
1
,
1
,
0
,
PixelFormat32bppRGB
,
NULL
,
&
bitmap2
);
expect
(
Ok
,
stat
);
stat
=
GdipBitmapSetPixel
(
bitmap1
,
0
,
0
,
0xff00ff00
);
expect
(
Ok
,
stat
);
stat
=
GdipGetImageGraphicsContext
((
GpImage
*
)
bitmap2
,
&
graphics
);
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
);
todo_wine
ok
(
color_match
(
0xffff00ff
,
color
,
1
),
"Expected ffff00ff, got %.8x
\n
"
,
color
);
GdipDeleteGraphics
(
graphics
);
GdipDisposeImage
((
GpImage
*
)
bitmap1
);
GdipDisposeImage
((
GpImage
*
)
bitmap2
);
GdipDisposeImageAttributes
(
imageattr
);
GdipFree
(
map
);
}
START_TEST
(
image
)
START_TEST
(
image
)
{
{
struct
GdiplusStartupInput
gdiplusStartupInput
;
struct
GdiplusStartupInput
gdiplusStartupInput
;
...
@@ -1780,6 +1845,7 @@ START_TEST(image)
...
@@ -1780,6 +1845,7 @@ START_TEST(image)
test_gamma
();
test_gamma
();
test_multiframegif
();
test_multiframegif
();
test_rotateflip
();
test_rotateflip
();
test_remaptable
();
GdiplusShutdown
(
gdiplusToken
);
GdiplusShutdown
(
gdiplusToken
);
}
}
include/gdipluscolormatrix.h
View file @
74a3945b
...
@@ -45,7 +45,7 @@ enum ColorAdjustType
...
@@ -45,7 +45,7 @@ enum ColorAdjustType
struct
ColorMap
struct
ColorMap
{
{
Color
oldColor
;
Color
oldColor
;
Color
newC
O
lor
;
Color
newC
o
lor
;
};
};
#ifndef __cplusplus
#ifndef __cplusplus
...
...
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