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
be5b2706
Commit
be5b2706
authored
Jun 06, 2016
by
Vincent Povirk
Committed by
Alexandre Julliard
Jun 07, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Return visible clip bounds in world coordinates.
Signed-off-by:
Vincent Povirk
<
vincent@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f42ff6fe
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
0 deletions
+31
-0
graphics.c
dlls/gdiplus/graphics.c
+8
-0
graphics.c
dlls/gdiplus/tests/graphics.c
+23
-0
No files found.
dlls/gdiplus/graphics.c
View file @
be5b2706
...
@@ -4297,6 +4297,7 @@ GpStatus WINGDIPAPI GdipGetVisibleClipBounds(GpGraphics *graphics, GpRectF *rect
...
@@ -4297,6 +4297,7 @@ GpStatus WINGDIPAPI GdipGetVisibleClipBounds(GpGraphics *graphics, GpRectF *rect
{
{
GpRegion
*
clip_rgn
;
GpRegion
*
clip_rgn
;
GpStatus
stat
;
GpStatus
stat
;
GpMatrix
device_to_world
;
TRACE
(
"(%p, %p)
\n
"
,
graphics
,
rect
);
TRACE
(
"(%p, %p)
\n
"
,
graphics
,
rect
);
...
@@ -4313,6 +4314,13 @@ GpStatus WINGDIPAPI GdipGetVisibleClipBounds(GpGraphics *graphics, GpRectF *rect
...
@@ -4313,6 +4314,13 @@ GpStatus WINGDIPAPI GdipGetVisibleClipBounds(GpGraphics *graphics, GpRectF *rect
if
((
stat
=
get_visible_clip_region
(
graphics
,
clip_rgn
))
!=
Ok
)
if
((
stat
=
get_visible_clip_region
(
graphics
,
clip_rgn
))
!=
Ok
)
goto
cleanup
;
goto
cleanup
;
/* transform to world coordinates */
if
((
stat
=
get_graphics_transform
(
graphics
,
CoordinateSpaceWorld
,
CoordinateSpaceDevice
,
&
device_to_world
))
!=
Ok
)
goto
cleanup
;
if
((
stat
=
GdipTransformRegion
(
clip_rgn
,
&
device_to_world
))
!=
Ok
)
goto
cleanup
;
/* get bounds of the region */
/* get bounds of the region */
stat
=
GdipGetRegionBounds
(
clip_rgn
,
graphics
,
rect
);
stat
=
GdipGetRegionBounds
(
clip_rgn
,
graphics
,
rect
);
...
...
dlls/gdiplus/tests/graphics.c
View file @
be5b2706
...
@@ -2313,6 +2313,29 @@ static void test_GdipGetVisibleClipBounds_window(void)
...
@@ -2313,6 +2313,29 @@ static void test_GdipGetVisibleClipBounds_window(void)
recti
.
X
,
recti
.
Y
,
recti
.
Width
,
recti
.
Height
,
recti
.
X
,
recti
.
Y
,
recti
.
Width
,
recti
.
Height
,
exp
.
X
,
exp
.
Y
,
exp
.
Width
,
exp
.
Height
);
exp
.
X
,
exp
.
Y
,
exp
.
Width
,
exp
.
Height
);
/* window bounds with transform applied */
status
=
GdipResetClip
(
graphics
);
expect
(
Ok
,
status
);
status
=
GdipScaleWorldTransform
(
graphics
,
0
.
5
,
0
.
5
,
MatrixOrderPrepend
);
expect
(
Ok
,
status
);
exp
.
X
=
window
.
X
*
2
.
0
;
exp
.
Y
=
window
.
Y
*
2
.
0
;
exp
.
Width
=
window
.
Width
*
2
.
0
;
exp
.
Height
=
window
.
Height
*
2
.
0
;
status
=
GdipGetVisibleClipBounds
(
graphics
,
&
rectf
);
expect
(
Ok
,
status
);
ok
(
rectf
.
X
==
exp
.
X
&&
rectf
.
Y
==
exp
.
Y
&&
rectf
.
Width
==
exp
.
Width
&&
rectf
.
Height
==
exp
.
Height
,
"Expected clip bounds (%0.f, %0.f, %0.f, %0.f) to be "
"twice the window size (%0.f, %0.f, %0.f, %0.f)
\n
"
,
rectf
.
X
,
rectf
.
Y
,
rectf
.
Width
,
rectf
.
Height
,
exp
.
X
,
exp
.
Y
,
exp
.
Width
,
exp
.
Height
);
GdipDeleteGraphics
(
graphics
);
GdipDeleteGraphics
(
graphics
);
EndPaint
(
hwnd
,
&
ps
);
EndPaint
(
hwnd
,
&
ps
);
}
}
...
...
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