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
3815add3
Commit
3815add3
authored
Jan 30, 2010
by
Vincent Povirk
Committed by
Alexandre Julliard
Feb 01, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Test getting/setting pixels of indexed color bitmaps.
parent
762845ca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
0 deletions
+49
-0
image.c
dlls/gdiplus/tests/image.c
+49
-0
No files found.
dlls/gdiplus/tests/image.c
View file @
3815add3
...
...
@@ -1133,6 +1133,7 @@ static void test_palette(void)
INT
size
;
BYTE
buffer
[
1040
];
ColorPalette
*
palette
=
(
ColorPalette
*
)
buffer
;
ARGB
color
=
0
;
/* test initial palette from non-indexed bitmap */
stat
=
GdipCreateBitmapFromScan0
(
2
,
2
,
8
,
PixelFormat32bppRGB
,
NULL
,
&
bitmap
);
...
...
@@ -1178,6 +1179,22 @@ static void test_palette(void)
expect
(
0xff000000
,
palette
->
Entries
[
0
]);
expect
(
0xffffffff
,
palette
->
Entries
[
1
]);
/* test getting/setting pixels */
stat
=
GdipBitmapGetPixel
(
bitmap
,
0
,
0
,
&
color
);
todo_wine
expect
(
Ok
,
stat
);
todo_wine
expect
(
0xff000000
,
color
);
stat
=
GdipBitmapSetPixel
(
bitmap
,
0
,
1
,
0xffffffff
);
todo_wine
ok
((
stat
==
Ok
)
||
broken
(
stat
==
InvalidParameter
)
/* pre-win7 */
,
"stat=%.8x
\n
"
,
stat
);
if
(
stat
==
Ok
)
{
stat
=
GdipBitmapGetPixel
(
bitmap
,
0
,
1
,
&
color
);
expect
(
Ok
,
stat
);
expect
(
0xffffffff
,
color
);
}
GdipDisposeImage
((
GpImage
*
)
bitmap
);
/* test initial palette on 4-bit bitmap */
...
...
@@ -1195,6 +1212,22 @@ static void test_palette(void)
check_halftone_palette
(
palette
);
/* test getting/setting pixels */
stat
=
GdipBitmapGetPixel
(
bitmap
,
0
,
0
,
&
color
);
todo_wine
expect
(
Ok
,
stat
);
todo_wine
expect
(
0xff000000
,
color
);
stat
=
GdipBitmapSetPixel
(
bitmap
,
0
,
1
,
0xffff00ff
);
todo_wine
ok
((
stat
==
Ok
)
||
broken
(
stat
==
InvalidParameter
)
/* pre-win7 */
,
"stat=%.8x
\n
"
,
stat
);
if
(
stat
==
Ok
)
{
stat
=
GdipBitmapGetPixel
(
bitmap
,
0
,
1
,
&
color
);
expect
(
Ok
,
stat
);
expect
(
0xffff00ff
,
color
);
}
GdipDisposeImage
((
GpImage
*
)
bitmap
);
/* test initial palette on 8-bit bitmap */
...
...
@@ -1212,6 +1245,22 @@ static void test_palette(void)
check_halftone_palette
(
palette
);
/* test getting/setting pixels */
stat
=
GdipBitmapGetPixel
(
bitmap
,
0
,
0
,
&
color
);
todo_wine
expect
(
Ok
,
stat
);
todo_wine
expect
(
0xff000000
,
color
);
stat
=
GdipBitmapSetPixel
(
bitmap
,
0
,
1
,
0xffcccccc
);
todo_wine
ok
((
stat
==
Ok
)
||
broken
(
stat
==
InvalidParameter
)
/* pre-win7 */
,
"stat=%.8x
\n
"
,
stat
);
if
(
stat
==
Ok
)
{
stat
=
GdipBitmapGetPixel
(
bitmap
,
0
,
1
,
&
color
);
expect
(
Ok
,
stat
);
expect
(
0xffcccccc
,
color
);
}
/* test setting/getting a different palette */
palette
->
Entries
[
1
]
=
0xffcccccc
;
...
...
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