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
e1572f9c
Commit
e1572f9c
authored
Jul 04, 2013
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jul 08, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus/tests: Add GdipGetClipBounds tests.
parent
24ab4453
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
0 deletions
+59
-0
graphics.c
dlls/gdiplus/tests/graphics.c
+59
-0
No files found.
dlls/gdiplus/tests/graphics.c
View file @
e1572f9c
...
...
@@ -4521,6 +4521,64 @@ static void test_bitmapfromgraphics(void)
GdipDisposeImage
((
GpImage
*
)
bitmap
);
}
static
void
test_clipping
(
void
)
{
HDC
hdc
;
GpStatus
status
;
GpGraphics
*
graphics
;
GpRegion
*
region
;
GpMatrix
*
matrix
;
GpRectF
rect
;
hdc
=
CreateCompatibleDC
(
0
);
status
=
GdipCreateFromHDC
(
hdc
,
&
graphics
);
expect
(
Ok
,
status
);
status
=
GdipCreateRegion
(
&
region
);
expect
(
Ok
,
status
);
status
=
GdipSetEmpty
(
region
);
expect
(
Ok
,
status
);
rect
.
X
=
rect
.
Y
=
100
.
0
;
rect
.
Width
=
rect
.
Height
=
100
.
0
;
status
=
GdipCombineRegionRect
(
region
,
&
rect
,
CombineModeUnion
);
expect
(
Ok
,
status
);
status
=
GdipSetClipRegion
(
graphics
,
region
,
CombineModeReplace
);
expect
(
Ok
,
status
);
status
=
GdipGetClipBounds
(
graphics
,
&
rect
);
expect
(
Ok
,
status
);
expectf
(
100
.
0
,
rect
.
X
);
expectf
(
100
.
0
,
rect
.
Y
);
expectf
(
100
.
0
,
rect
.
Width
);
expectf
(
100
.
0
,
rect
.
Height
);
status
=
GdipCreateMatrix
(
&
matrix
);
expect
(
Ok
,
status
);
status
=
GdipScaleMatrix
(
matrix
,
2
.
0
,
4
.
0
,
MatrixOrderAppend
);
expect
(
Ok
,
status
);
status
=
GdipTranslateMatrix
(
matrix
,
10
.
0
,
20
.
0
,
MatrixOrderAppend
);
expect
(
Ok
,
status
);
status
=
GdipSetWorldTransform
(
graphics
,
matrix
);
expect
(
Ok
,
status
);
status
=
GdipGetClipBounds
(
graphics
,
&
rect
);
expect
(
Ok
,
status
);
todo_wine
expectf
(
45
.
0
,
rect
.
X
);
todo_wine
expectf
(
20
.
0
,
rect
.
Y
);
todo_wine
expectf
(
50
.
0
,
rect
.
Width
);
todo_wine
expectf
(
25
.
0
,
rect
.
Height
);
GdipDeleteMatrix
(
matrix
);
GdipDeleteRegion
(
region
);
GdipDeleteGraphics
(
graphics
);
DeleteDC
(
hdc
);
}
START_TEST
(
graphics
)
{
struct
GdiplusStartupInput
gdiplusStartupInput
;
...
...
@@ -4547,6 +4605,7 @@ START_TEST(graphics)
GdiplusStartup
(
&
gdiplusToken
,
&
gdiplusStartupInput
,
NULL
);
test_clipping
();
test_measured_extra_space
();
test_measure_string
();
test_font_height_scaling
();
...
...
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