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
423ba9cb
Commit
423ba9cb
authored
Mar 18, 2024
by
Esme Povirk
Committed by
Alexandre Julliard
Mar 20, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus/tests: Region bounds aren't rounded.
parent
9f3f6128
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
0 deletions
+39
-0
region.c
dlls/gdiplus/tests/region.c
+39
-0
No files found.
dlls/gdiplus/tests/region.c
View file @
423ba9cb
...
...
@@ -1732,6 +1732,7 @@ static void test_scans(void)
static
void
test_getbounds
(
void
)
{
GpRegion
*
region
;
GpPath
*
path
;
GpGraphics
*
graphics
;
GpStatus
status
;
GpRectF
rectf
;
...
...
@@ -1807,6 +1808,44 @@ static void test_getbounds(void)
ok
(
rectf
.
Width
==
100
.
0
,
"Expected width = 0.0, got %.2f
\n
"
,
rectf
.
Width
);
ok
(
rectf
.
Height
==
100
.
0
,
"Expected height = 0.0, got %.2f
\n
"
,
rectf
.
Height
);
/* coordinates are not rounded */
status
=
GdipResetWorldTransform
(
graphics
);
ok
(
status
==
Ok
,
"status %08x
\n
"
,
status
);
status
=
GdipResetPageTransform
(
graphics
);
ok
(
status
==
Ok
,
"status %08x
\n
"
,
status
);
rectf
.
X
=
0
.
125
;
rectf
.
Y
=
1
.
125
;
rectf
.
Width
=
2
.
125
;
rectf
.
Height
=
3
.
125
;
status
=
GdipCombineRegionRect
(
region
,
&
rectf
,
CombineModeReplace
);
ok
(
status
==
Ok
,
"status %08x
\n
"
,
status
);
rectf
.
X
=
rectf
.
Y
=
0
.
0
;
rectf
.
Height
=
rectf
.
Width
=
0
.
0
;
status
=
GdipGetRegionBounds
(
region
,
graphics
,
&
rectf
);
ok
(
status
==
Ok
,
"status %08x
\n
"
,
status
);
todo_wine
ok
(
rectf
.
X
==
0
.
125
,
"Expected X = 0.0, got %.2f
\n
"
,
rectf
.
X
);
todo_wine
ok
(
rectf
.
Y
==
1
.
125
,
"Expected Y = 0.0, got %.2f
\n
"
,
rectf
.
Y
);
todo_wine
ok
(
rectf
.
Width
==
2
.
125
,
"Expected width = 0.0, got %.2f
\n
"
,
rectf
.
Width
);
todo_wine
ok
(
rectf
.
Height
==
3
.
125
,
"Expected height = 0.0, got %.2f
\n
"
,
rectf
.
Height
);
/* test path */
status
=
GdipCreatePath
(
FillModeAlternate
,
&
path
);
ok
(
status
==
Ok
,
"status %08x
\n
"
,
status
);
status
=
GdipAddPathRectangle
(
path
,
0
.
125
,
1
.
125
,
2
.
125
,
3
.
125
);
ok
(
status
==
Ok
,
"status %08x
\n
"
,
status
);
status
=
GdipCombineRegionPath
(
region
,
path
,
CombineModeReplace
);
ok
(
status
==
Ok
,
"status %08x
\n
"
,
status
);
status
=
GdipDeletePath
(
path
);
ok
(
status
==
Ok
,
"status %08x
\n
"
,
status
);
rectf
.
X
=
rectf
.
Y
=
0
.
0
;
rectf
.
Height
=
rectf
.
Width
=
0
.
0
;
status
=
GdipGetRegionBounds
(
region
,
graphics
,
&
rectf
);
ok
(
status
==
Ok
,
"status %08x
\n
"
,
status
);
todo_wine
ok
(
rectf
.
X
==
0
.
125
,
"Expected X = 0.0, got %.2f
\n
"
,
rectf
.
X
);
todo_wine
ok
(
rectf
.
Y
==
1
.
125
,
"Expected Y = 0.0, got %.2f
\n
"
,
rectf
.
Y
);
todo_wine
ok
(
rectf
.
Width
==
2
.
125
,
"Expected width = 0.0, got %.2f
\n
"
,
rectf
.
Width
);
todo_wine
ok
(
rectf
.
Height
==
3
.
125
,
"Expected height = 0.0, got %.2f
\n
"
,
rectf
.
Height
);
status
=
GdipDeleteRegion
(
region
);
ok
(
status
==
Ok
,
"status %08x
\n
"
,
status
);
status
=
GdipDeleteGraphics
(
graphics
);
...
...
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