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
3a6ba940
Commit
3a6ba940
authored
Jul 07, 2011
by
Vincent Povirk
Committed by
Alexandre Julliard
Jul 08, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Add test showing scaling does not affect returned HDC objects.
parent
71325800
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
0 deletions
+49
-0
graphics.c
dlls/gdiplus/tests/graphics.c
+49
-0
No files found.
dlls/gdiplus/tests/graphics.c
View file @
3a6ba940
...
...
@@ -3251,6 +3251,54 @@ static void test_get_set_textrenderinghint(void)
ReleaseDC
(
hwnd
,
hdc
);
}
static
void
test_getdc_scaled
(
void
)
{
GpStatus
status
;
GpGraphics
*
graphics
=
NULL
;
GpBitmap
*
bitmap
=
NULL
;
HDC
hdc
=
NULL
;
HBRUSH
hbrush
,
holdbrush
;
ARGB
color
;
status
=
GdipCreateBitmapFromScan0
(
10
,
10
,
12
,
PixelFormat24bppRGB
,
NULL
,
&
bitmap
);
expect
(
Ok
,
status
);
status
=
GdipGetImageGraphicsContext
((
GpImage
*
)
bitmap
,
&
graphics
);
expect
(
Ok
,
status
);
status
=
GdipScaleWorldTransform
(
graphics
,
2
.
0
,
2
.
0
,
MatrixOrderPrepend
);
expect
(
Ok
,
status
);
status
=
GdipGetDC
(
graphics
,
&
hdc
);
expect
(
Ok
,
status
);
ok
(
hdc
!=
NULL
,
"got NULL hdc
\n
"
);
hbrush
=
CreateSolidBrush
(
RGB
(
255
,
0
,
0
));
holdbrush
=
SelectObject
(
hdc
,
hbrush
);
Rectangle
(
hdc
,
2
,
2
,
6
,
6
);
SelectObject
(
hdc
,
holdbrush
);
DeleteObject
(
hbrush
);
status
=
GdipReleaseDC
(
graphics
,
hdc
);
expect
(
Ok
,
status
);
GdipDeleteGraphics
(
graphics
);
status
=
GdipBitmapGetPixel
(
bitmap
,
3
,
3
,
&
color
);
expect
(
Ok
,
status
);
expect
(
0xffff0000
,
color
);
status
=
GdipBitmapGetPixel
(
bitmap
,
8
,
8
,
&
color
);
expect
(
Ok
,
status
);
expect
(
0xff000000
,
color
);
GdipDisposeImage
((
GpImage
*
)
bitmap
);
}
START_TEST
(
graphics
)
{
struct
GdiplusStartupInput
gdiplusStartupInput
;
...
...
@@ -3311,6 +3359,7 @@ START_TEST(graphics)
test_string_functions
();
test_get_set_interpolation
();
test_get_set_textrenderinghint
();
test_getdc_scaled
();
GdiplusShutdown
(
gdiplusToken
);
DestroyWindow
(
hwnd
);
...
...
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