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
f575eb49
Commit
f575eb49
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: Reimplement GdipSetClipRect to avoid potential problems with rotating world transform.
parent
cdc3e820
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
22 deletions
+14
-22
graphics.c
dlls/gdiplus/graphics.c
+14
-22
No files found.
dlls/gdiplus/graphics.c
View file @
f575eb49
...
@@ -54,26 +54,6 @@ static GpStatus draw_driver_string(GpGraphics *graphics, GDIPCONST UINT16 *text,
...
@@ -54,26 +54,6 @@ static GpStatus draw_driver_string(GpGraphics *graphics, GDIPCONST UINT16 *text,
static
GpStatus
get_graphics_transform
(
GpGraphics
*
graphics
,
GpCoordinateSpace
dst_space
,
static
GpStatus
get_graphics_transform
(
GpGraphics
*
graphics
,
GpCoordinateSpace
dst_space
,
GpCoordinateSpace
src_space
,
GpMatrix
*
matrix
);
GpCoordinateSpace
src_space
,
GpMatrix
*
matrix
);
static
void
transform_rectf
(
GpGraphics
*
graphics
,
GpCoordinateSpace
dst_space
,
GpCoordinateSpace
src_space
,
GpRectF
*
rect
)
{
GpPointF
pt
[
3
];
pt
[
0
].
X
=
rect
->
X
;
pt
[
0
].
Y
=
rect
->
Y
;
pt
[
1
].
X
=
rect
->
X
+
rect
->
Width
;
pt
[
1
].
Y
=
rect
->
Y
;
pt
[
2
].
X
=
rect
->
X
;
pt
[
2
].
Y
=
rect
->
Y
+
rect
->
Height
;
GdipTransformPoints
(
graphics
,
dst_space
,
src_space
,
pt
,
3
);
rect
->
X
=
pt
[
0
].
X
;
rect
->
Y
=
pt
[
0
].
Y
;
rect
->
Width
=
sqrt
((
pt
[
1
].
Y
-
pt
[
0
].
Y
)
*
(
pt
[
1
].
Y
-
pt
[
0
].
Y
)
+
(
pt
[
1
].
X
-
pt
[
0
].
X
)
*
(
pt
[
1
].
X
-
pt
[
0
].
X
));
rect
->
Height
=
sqrt
((
pt
[
2
].
Y
-
pt
[
0
].
Y
)
*
(
pt
[
2
].
Y
-
pt
[
0
].
Y
)
+
(
pt
[
2
].
X
-
pt
[
0
].
X
)
*
(
pt
[
2
].
X
-
pt
[
0
].
X
));
}
/* Converts from gdiplus path point type to gdi path point type. */
/* Converts from gdiplus path point type to gdi path point type. */
static
BYTE
convert_path_point_type
(
BYTE
type
)
static
BYTE
convert_path_point_type
(
BYTE
type
)
{
{
...
@@ -5476,7 +5456,9 @@ GpStatus WINGDIPAPI GdipSetClipRect(GpGraphics *graphics, REAL x, REAL y,
...
@@ -5476,7 +5456,9 @@ GpStatus WINGDIPAPI GdipSetClipRect(GpGraphics *graphics, REAL x, REAL y,
REAL
width
,
REAL
height
,
REAL
width
,
REAL
height
,
CombineMode
mode
)
CombineMode
mode
)
{
{
GpStatus
status
;
GpRectF
rect
;
GpRectF
rect
;
GpRegion
*
region
;
TRACE
(
"(%p, %.2f, %.2f, %.2f, %.2f, %d)
\n
"
,
graphics
,
x
,
y
,
width
,
height
,
mode
);
TRACE
(
"(%p, %.2f, %.2f, %.2f, %.2f, %d)
\n
"
,
graphics
,
x
,
y
,
width
,
height
,
mode
);
...
@@ -5490,9 +5472,19 @@ GpStatus WINGDIPAPI GdipSetClipRect(GpGraphics *graphics, REAL x, REAL y,
...
@@ -5490,9 +5472,19 @@ GpStatus WINGDIPAPI GdipSetClipRect(GpGraphics *graphics, REAL x, REAL y,
rect
.
Y
=
y
;
rect
.
Y
=
y
;
rect
.
Width
=
width
;
rect
.
Width
=
width
;
rect
.
Height
=
height
;
rect
.
Height
=
height
;
transform_rectf
(
graphics
,
CoordinateSpaceDevice
,
CoordinateSpaceWorld
,
&
rect
);
status
=
GdipCreateRegionRect
(
&
rect
,
&
region
);
if
(
status
==
Ok
)
{
GpMatrix
world_to_device
;
return
GdipCombineRegionRect
(
graphics
->
clip
,
&
rect
,
mode
);
get_graphics_transform
(
graphics
,
CoordinateSpaceDevice
,
CoordinateSpaceWorld
,
&
world_to_device
);
status
=
GdipTransformRegion
(
region
,
&
world_to_device
);
if
(
status
==
Ok
)
status
=
GdipCombineRegionRegion
(
graphics
->
clip
,
region
,
mode
);
GdipDeleteRegion
(
region
);
}
return
status
;
}
}
GpStatus
WINGDIPAPI
GdipSetClipRectI
(
GpGraphics
*
graphics
,
INT
x
,
INT
y
,
GpStatus
WINGDIPAPI
GdipSetClipRectI
(
GpGraphics
*
graphics
,
INT
x
,
INT
y
,
...
...
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