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
069f20d1
Commit
069f20d1
authored
Oct 11, 2016
by
Vincent Povirk
Committed by
Alexandre Julliard
Oct 11, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Implement EMR_EXTSELECTCLIPRGN playback.
Signed-off-by:
Vincent Povirk
<
vincent@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
da819ebe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
9 deletions
+36
-9
metafile.c
dlls/gdiplus/metafile.c
+36
-9
No files found.
dlls/gdiplus/metafile.c
View file @
069f20d1
...
...
@@ -1040,21 +1040,27 @@ GpStatus WINGDIPAPI GdipGetHemfFromMetafile(GpMetafile *metafile, HENHMETAFILE *
return
Ok
;
}
static
GpStatus
METAFILE_PlaybackUpdateGdiTransform
(
GpMetafile
*
metafile
)
static
void
METAFILE_GetFinalGdiTransform
(
const
GpMetafile
*
metafile
,
XFORM
*
result
)
{
XFORM
combined
,
final
;
const
GpRectF
*
rect
;
const
GpPointF
*
pt
;
/* This transforms metafile device space to output points. */
rect
=
&
metafile
->
src_rect
;
pt
=
metafile
->
playback_points
;
final
.
eM11
=
(
pt
[
1
].
X
-
pt
[
0
].
X
)
/
rect
->
Width
;
final
.
eM21
=
(
pt
[
2
].
X
-
pt
[
0
].
X
)
/
rect
->
Height
;
final
.
eDx
=
pt
[
0
].
X
-
final
.
eM11
*
rect
->
X
-
final
.
eM21
*
rect
->
Y
;
final
.
eM12
=
(
pt
[
1
].
Y
-
pt
[
0
].
Y
)
/
rect
->
Width
;
final
.
eM22
=
(
pt
[
2
].
Y
-
pt
[
0
].
Y
)
/
rect
->
Height
;
final
.
eDy
=
pt
[
0
].
Y
-
final
.
eM12
*
rect
->
X
-
final
.
eM22
*
rect
->
Y
;
result
->
eM11
=
(
pt
[
1
].
X
-
pt
[
0
].
X
)
/
rect
->
Width
;
result
->
eM21
=
(
pt
[
2
].
X
-
pt
[
0
].
X
)
/
rect
->
Height
;
result
->
eDx
=
pt
[
0
].
X
-
result
->
eM11
*
rect
->
X
-
result
->
eM21
*
rect
->
Y
;
result
->
eM12
=
(
pt
[
1
].
Y
-
pt
[
0
].
Y
)
/
rect
->
Width
;
result
->
eM22
=
(
pt
[
2
].
Y
-
pt
[
0
].
Y
)
/
rect
->
Height
;
result
->
eDy
=
pt
[
0
].
Y
-
result
->
eM12
*
rect
->
X
-
result
->
eM22
*
rect
->
Y
;
}
static
GpStatus
METAFILE_PlaybackUpdateGdiTransform
(
GpMetafile
*
metafile
)
{
XFORM
combined
,
final
;
METAFILE_GetFinalGdiTransform
(
metafile
,
&
final
);
CombineTransform
(
&
combined
,
&
metafile
->
gdiworldtransform
,
&
final
);
...
...
@@ -1154,7 +1160,6 @@ GpStatus WINGDIPAPI GdipPlayMetafileRecord(GDIPCONST GpMetafile *metafile,
case
EMR_SETWINDOWEXTEX
:
case
EMR_SETVIEWPORTORGEX
:
case
EMR_SETVIEWPORTEXTEX
:
case
EMR_EXTSELECTCLIPRGN
:
case
EMR_SCALEVIEWPORTEXTEX
:
case
EMR_SCALEWINDOWEXTEX
:
case
EMR_MODIFYWORLDTRANSFORM
:
...
...
@@ -1167,6 +1172,28 @@ GpStatus WINGDIPAPI GdipPlayMetafileRecord(GDIPCONST GpMetafile *metafile,
METAFILE_PlaybackUpdateGdiTransform
(
real_metafile
);
break
;
}
case
EMR_EXTSELECTCLIPRGN
:
{
DWORD
rgndatasize
=
*
(
DWORD
*
)
data
;
DWORD
mode
=
*
(
DWORD
*
)(
data
+
4
);
const
RGNDATA
*
rgndata
=
(
const
RGNDATA
*
)(
data
+
8
);
HRGN
hrgn
=
NULL
;
if
(
dataSize
>
8
)
{
XFORM
final
;
METAFILE_GetFinalGdiTransform
(
metafile
,
&
final
);
hrgn
=
ExtCreateRegion
(
&
final
,
rgndatasize
,
rgndata
);
}
ExtSelectClipRgn
(
metafile
->
playback_dc
,
hrgn
,
mode
);
DeleteObject
(
hrgn
);
return
Ok
;
}
default:
break
;
}
...
...
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