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
728aaf29
Commit
728aaf29
authored
Aug 16, 2010
by
Vincent Povirk
Committed by
Alexandre Julliard
Aug 17, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Add tests for the HDC's we get from bitmap objects.
parent
2a345f36
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
0 deletions
+46
-0
graphics.c
dlls/gdiplus/tests/graphics.c
+46
-0
No files found.
dlls/gdiplus/tests/graphics.c
View file @
728aaf29
...
...
@@ -2157,6 +2157,8 @@ static void test_fromMemoryBitmap(void)
GpGraphics
*
graphics
=
NULL
;
GpBitmap
*
bitmap
=
NULL
;
BYTE
bits
[
48
]
=
{
0
};
HDC
hdc
=
NULL
;
COLORREF
color
;
status
=
GdipCreateBitmapFromScan0
(
4
,
4
,
12
,
PixelFormat24bppRGB
,
bits
,
&
bitmap
);
expect
(
Ok
,
status
);
...
...
@@ -2172,6 +2174,50 @@ static void test_fromMemoryBitmap(void)
/* drawing writes to the memory provided */
todo_wine
expect
(
0x68
,
bits
[
10
]);
status
=
GdipGetImageGraphicsContext
((
GpImage
*
)
bitmap
,
&
graphics
);
expect
(
Ok
,
status
);
status
=
GdipGetDC
(
graphics
,
&
hdc
);
expect
(
Ok
,
status
);
ok
(
hdc
!=
NULL
,
"got NULL hdc
\n
"
);
color
=
GetPixel
(
hdc
,
0
,
0
);
/* The HDC is write-only, and native fills with a solid color to figure out
* which pixels have changed. */
todo_wine
expect
(
0x0c0b0d
,
color
);
SetPixel
(
hdc
,
0
,
0
,
0x797979
);
SetPixel
(
hdc
,
1
,
0
,
0x0c0b0d
);
status
=
GdipReleaseDC
(
graphics
,
hdc
);
expect
(
Ok
,
status
);
GdipDeleteGraphics
(
graphics
);
todo_wine
expect
(
0x79
,
bits
[
0
]);
todo_wine
expect
(
0x68
,
bits
[
3
]);
GdipDisposeImage
((
GpImage
*
)
bitmap
);
/* We get the same kind of write-only HDC for a "normal" bitmap */
status
=
GdipCreateBitmapFromScan0
(
4
,
4
,
12
,
PixelFormat24bppRGB
,
NULL
,
&
bitmap
);
expect
(
Ok
,
status
);
status
=
GdipGetImageGraphicsContext
((
GpImage
*
)
bitmap
,
&
graphics
);
expect
(
Ok
,
status
);
status
=
GdipGetDC
(
graphics
,
&
hdc
);
expect
(
Ok
,
status
);
ok
(
hdc
!=
NULL
,
"got NULL hdc
\n
"
);
color
=
GetPixel
(
hdc
,
0
,
0
);
todo_wine
expect
(
0x0c0b0d
,
color
);
status
=
GdipReleaseDC
(
graphics
,
hdc
);
expect
(
Ok
,
status
);
GdipDeleteGraphics
(
graphics
);
GdipDisposeImage
((
GpImage
*
)
bitmap
);
}
...
...
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