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
cdc3e820
Commit
cdc3e820
authored
Jul 22, 2013
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jul 30, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Fix clipping region bounds calculation with rotating transform.
parent
249bf0eb
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
13 deletions
+16
-13
graphics.c
dlls/gdiplus/graphics.c
+7
-2
graphics.c
dlls/gdiplus/tests/graphics.c
+9
-11
No files found.
dlls/gdiplus/graphics.c
View file @
cdc3e820
...
...
@@ -4068,6 +4068,7 @@ GpStatus WINGDIPAPI GdipFlush(GpGraphics *graphics, GpFlushIntention intention)
GpStatus
WINGDIPAPI
GdipGetClipBounds
(
GpGraphics
*
graphics
,
GpRectF
*
rect
)
{
GpStatus
status
;
GpRegion
*
clip
;
TRACE
(
"(%p, %p)
\n
"
,
graphics
,
rect
);
...
...
@@ -4077,10 +4078,14 @@ GpStatus WINGDIPAPI GdipGetClipBounds(GpGraphics *graphics, GpRectF *rect)
if
(
graphics
->
busy
)
return
ObjectBusy
;
status
=
GdipGetRegionBounds
(
graphics
->
clip
,
graphics
,
rect
);
status
=
GdipCreateRegion
(
&
clip
);
if
(
status
!=
Ok
)
return
status
;
status
=
GdipGetClip
(
graphics
,
clip
);
if
(
status
==
Ok
)
transform_rectf
(
graphics
,
CoordinateSpaceWorld
,
CoordinateSpaceDevice
,
rect
);
status
=
GdipGetRegionBounds
(
clip
,
graphics
,
rect
);
GdipDeleteRegion
(
clip
);
return
status
;
}
...
...
dlls/gdiplus/tests/graphics.c
View file @
cdc3e820
...
...
@@ -4741,6 +4741,8 @@ static void test_clipping(void)
status
=
GdipGetClipBounds
(
graphics
,
&
rect
);
expect
(
Ok
,
status
);
ok
((
rect
.
X
==
13
.
75
&&
rect
.
Y
==
4
.
375
&&
rect
.
Width
==
18
.
75
&&
rect
.
Height
==
9
.
375
)
||
/* rounding under Wine is slightly different */
(
rect
.
X
==
14
.
0
&&
rect
.
Y
==
4
.
0
&&
rect
.
Width
==
19
.
0
&&
rect
.
Height
==
10
.
0
)
/* Wine */
||
broken
(
rect
.
X
==
45
.
0
&&
rect
.
Y
==
20
.
0
&&
rect
.
Width
==
50
.
0
&&
rect
.
Height
==
25
.
0
)
/* before Win7 */
,
"expected 13.75,4.375-18.75,9.375, got %.2f,%.2f-%.2f,%.2f
\n
"
,
rect
.
X
,
rect
.
Y
,
rect
.
Width
,
rect
.
Height
);
...
...
@@ -4885,9 +4887,7 @@ static void test_clipping(void)
status
=
GdipGetClipBounds
(
graphics
,
&
rect
);
expect
(
Ok
,
status
);
expectf_
(
20
.
612978
,
rect
.
X
,
1
.
0
);
todo_wine
expectf_
(
-
6
.
256012
,
rect
.
Y
,
1
.
5
);
todo_wine
expectf_
(
25
.
612978
,
rect
.
Width
,
1
.
0
);
expectf_
(
12
.
806489
,
rect
.
Height
,
1
.
0
);
...
...
@@ -4989,13 +4989,10 @@ todo_wine
status
=
GdipGetClipBounds
(
graphics
,
&
rect
);
expect
(
Ok
,
status
);
todo_wine
expectf
(
-
28
.
100956
,
rect
.
X
);
expectf
(
7
.
806488
,
rect
.
Y
);
todo_wine
expectf
(
25
.
612978
,
rect
.
Width
);
todo_wine
expectf
(
12
.
806489
,
rect
.
Height
);
expectf_
(
-
28
.
100956
,
rect
.
X
,
1
.
0
);
expectf_
(
7
.
806488
,
rect
.
Y
,
1
.
5
);
expectf_
(
25
.
612978
,
rect
.
Width
,
1
.
0
);
expectf_
(
12
.
806489
,
rect
.
Height
,
1
.
0
);
status
=
GdipSetEmpty
(
region
);
expect
(
Ok
,
status
);
...
...
@@ -5063,8 +5060,9 @@ todo_wine
expect
(
Ok
,
status
);
ret
=
GetRgnBox
(
hrgn
,
&
rc
);
ok
(
ret
==
COMPLEXREGION
,
"expected COMPLEXREGION, got %d
\n
"
,
ret
);
todo_wine
ok
(
rc
.
left
==
4500
&&
rc
.
top
==
351
&&
rc
.
right
==
8728
&&
rc
.
bottom
==
3407
,
ok
((
rc
.
left
==
4500
&&
rc
.
top
==
351
&&
rc
.
right
==
8728
&&
rc
.
bottom
==
3407
)
||
/* rounding under Wine is slightly different */
(
rc
.
left
==
4499
&&
rc
.
top
==
351
&&
rc
.
right
==
8728
&&
rc
.
bottom
==
3407
)
/* Wine */
,
"expected (4500,351)-(8728,3407), got (%d,%d)-(%d,%d)
\n
"
,
rc
.
left
,
rc
.
top
,
rc
.
right
,
rc
.
bottom
);
DeleteObject
(
hrgn
);
...
...
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