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
b32c3243
Commit
b32c3243
authored
Sep 05, 2017
by
Vincent Povirk
Committed by
Alexandre Julliard
Sep 05, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Account for gdi32 transform in GdipSetClipHrgn.
Signed-off-by:
Vincent Povirk
<
vincent@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9e1c1105
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
5 deletions
+59
-5
graphics.c
dlls/gdiplus/graphics.c
+13
-5
graphics.c
dlls/gdiplus/tests/graphics.c
+46
-0
No files found.
dlls/gdiplus/graphics.c
View file @
b32c3243
...
...
@@ -6209,6 +6209,7 @@ GpStatus WINGDIPAPI GdipSetClipHrgn(GpGraphics *graphics, HRGN hrgn, CombineMode
{
GpRegion
*
region
;
GpStatus
status
;
GpMatrix
transform
;
TRACE
(
"(%p, %p, %d)
\n
"
,
graphics
,
hrgn
,
mode
);
...
...
@@ -6218,14 +6219,21 @@ GpStatus WINGDIPAPI GdipSetClipHrgn(GpGraphics *graphics, HRGN hrgn, CombineMode
if
(
graphics
->
busy
)
return
ObjectBusy
;
/* hrgn is
already in
device units */
/* hrgn is
in gdi32
device units */
status
=
GdipCreateRegionHrgn
(
hrgn
,
&
region
);
if
(
status
!=
Ok
)
return
status
;
status
=
GdipCombineRegionRegion
(
graphics
->
clip
,
region
,
mode
);
if
(
status
==
Ok
)
{
status
=
get_graphics_transform
(
graphics
,
CoordinateSpaceDevice
,
WineCoordinateSpaceGdiDevice
,
&
transform
);
if
(
status
==
Ok
)
status
=
GdipTransformRegion
(
region
,
&
transform
);
if
(
status
==
Ok
)
status
=
GdipCombineRegionRegion
(
graphics
->
clip
,
region
,
mode
);
GdipDeleteRegion
(
region
);
GdipDeleteRegion
(
region
);
}
return
status
;
}
...
...
dlls/gdiplus/tests/graphics.c
View file @
b32c3243
...
...
@@ -6529,6 +6529,51 @@ static void test_GdipDrawImagePointsRectOnMemoryDC(void)
ReleaseDC
(
hwnd
,
dc
);
}
static
void
test_cliphrgn_transform
(
void
)
{
HDC
hdc
;
GpStatus
status
;
GpGraphics
*
graphics
;
HRGN
rgn
;
RectF
rectf
;
BOOL
res
;
hdc
=
GetDC
(
hwnd
);
SetViewportOrgEx
(
hdc
,
10
,
10
,
NULL
);
status
=
GdipCreateFromHDC
(
hdc
,
&
graphics
);
expect
(
Ok
,
status
);
rgn
=
CreateRectRgn
(
0
,
0
,
100
,
100
);
status
=
GdipSetClipHrgn
(
graphics
,
rgn
,
CombineModeReplace
);
expect
(
Ok
,
status
);
status
=
GdipGetVisibleClipBounds
(
graphics
,
&
rectf
);
expect
(
Ok
,
status
);
expectf
(
-
10
.
0
,
rectf
.
X
);
expectf
(
-
10
.
0
,
rectf
.
Y
);
expectf
(
100
.
0
,
rectf
.
Width
);
expectf
(
100
.
0
,
rectf
.
Height
);
status
=
GdipIsVisiblePoint
(
graphics
,
95
,
95
,
&
res
);
expect
(
Ok
,
status
);
expect
(
FALSE
,
res
);
status
=
GdipIsVisiblePoint
(
graphics
,
-
5
,
-
5
,
&
res
);
expect
(
Ok
,
status
);
expect
(
TRUE
,
res
);
DeleteObject
(
rgn
);
GdipDeleteGraphics
(
graphics
);
SetViewportOrgEx
(
hdc
,
0
,
0
,
NULL
);
ReleaseDC
(
hwnd
,
hdc
);
}
START_TEST
(
graphics
)
{
struct
GdiplusStartupInput
gdiplusStartupInput
;
...
...
@@ -6618,6 +6663,7 @@ START_TEST(graphics)
test_GdipDrawImagePointsRectOnMemoryDC
();
test_container_rects
();
test_GdipGraphicsSetAbort
();
test_cliphrgn_transform
();
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