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
e1cb4417
Commit
e1cb4417
authored
Sep 23, 2009
by
Vincent Povirk
Committed by
Alexandre Julliard
Sep 24, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Add tests for GdipBitmap(Get|Set)Pixel.
parent
789372af
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
74 additions
and
0 deletions
+74
-0
image.c
dlls/gdiplus/tests/image.c
+74
-0
No files found.
dlls/gdiplus/tests/image.c
View file @
e1cb4417
...
...
@@ -799,6 +799,79 @@ static void test_createhbitmap(void)
expect
(
Ok
,
stat
);
}
static
void
test_getsetpixel
(
void
)
{
GpStatus
stat
;
GpBitmap
*
bitmap
;
ARGB
color
;
BYTE
bits
[
16
]
=
{
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0xff
,
0xff
,
0x00
,
0xff
,
0x00
,
0x00
,
0x00
,
0xff
,
0xff
,
0xff
,
0x00
};
stat
=
GdipCreateBitmapFromScan0
(
2
,
2
,
8
,
PixelFormat32bppRGB
,
bits
,
&
bitmap
);
expect
(
Ok
,
stat
);
/* null parameters */
stat
=
GdipBitmapGetPixel
(
NULL
,
1
,
1
,
&
color
);
expect
(
InvalidParameter
,
stat
);
stat
=
GdipBitmapGetPixel
(
bitmap
,
1
,
1
,
NULL
);
expect
(
InvalidParameter
,
stat
);
stat
=
GdipBitmapSetPixel
(
NULL
,
1
,
1
,
0
);
expect
(
InvalidParameter
,
stat
);
/* out of bounds */
stat
=
GdipBitmapGetPixel
(
bitmap
,
-
1
,
1
,
&
color
);
todo_wine
expect
(
InvalidParameter
,
stat
);
stat
=
GdipBitmapSetPixel
(
bitmap
,
-
1
,
1
,
0
);
todo_wine
expect
(
InvalidParameter
,
stat
);
stat
=
GdipBitmapGetPixel
(
bitmap
,
1
,
-
1
,
&
color
);
todo_wine
expect
(
InvalidParameter
,
stat
);
stat
=
GdipBitmapSetPixel
(
bitmap
,
1
,
-
1
,
0
);
todo_wine
expect
(
InvalidParameter
,
stat
);
stat
=
GdipBitmapGetPixel
(
bitmap
,
2
,
1
,
&
color
);
todo_wine
expect
(
InvalidParameter
,
stat
);
stat
=
GdipBitmapSetPixel
(
bitmap
,
2
,
1
,
0
);
todo_wine
expect
(
InvalidParameter
,
stat
);
stat
=
GdipBitmapGetPixel
(
bitmap
,
1
,
2
,
&
color
);
todo_wine
expect
(
InvalidParameter
,
stat
);
stat
=
GdipBitmapSetPixel
(
bitmap
,
1
,
2
,
0
);
todo_wine
expect
(
InvalidParameter
,
stat
);
/* valid use */
stat
=
GdipBitmapGetPixel
(
bitmap
,
1
,
1
,
&
color
);
todo_wine
expect
(
Ok
,
stat
);
todo_wine
expect
(
0xffffffff
,
color
);
stat
=
GdipBitmapGetPixel
(
bitmap
,
0
,
1
,
&
color
);
todo_wine
expect
(
Ok
,
stat
);
todo_wine
expect
(
0xff0000ff
,
color
);
stat
=
GdipBitmapSetPixel
(
bitmap
,
1
,
1
,
0xff676869
);
todo_wine
expect
(
Ok
,
stat
);
stat
=
GdipBitmapSetPixel
(
bitmap
,
0
,
0
,
0xff474849
);
todo_wine
expect
(
Ok
,
stat
);
stat
=
GdipBitmapGetPixel
(
bitmap
,
1
,
1
,
&
color
);
todo_wine
expect
(
Ok
,
stat
);
todo_wine
expect
(
0xff676869
,
color
);
stat
=
GdipBitmapGetPixel
(
bitmap
,
0
,
0
,
&
color
);
todo_wine
expect
(
Ok
,
stat
);
todo_wine
expect
(
0xff474849
,
color
);
stat
=
GdipDisposeImage
((
GpImage
*
)
bitmap
);
expect
(
Ok
,
stat
);
}
START_TEST
(
image
)
{
struct
GdiplusStartupInput
gdiplusStartupInput
;
...
...
@@ -825,6 +898,7 @@ START_TEST(image)
test_fromhicon
();
test_getrawformat
();
test_createhbitmap
();
test_getsetpixel
();
GdiplusShutdown
(
gdiplusToken
);
}
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