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
fc560b21
Commit
fc560b21
authored
Nov 22, 2013
by
Vincent Povirk
Committed by
Alexandre Julliard
Nov 25, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Implement FillRects record playback.
parent
c491d528
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
70 additions
and
0 deletions
+70
-0
metafile.c
dlls/gdiplus/metafile.c
+70
-0
No files found.
dlls/gdiplus/metafile.c
View file @
fc560b21
...
...
@@ -487,6 +487,8 @@ static void METAFILE_PlaybackReleaseDC(GpMetafile *metafile)
GpStatus
WINGDIPAPI
GdipPlayMetafileRecord
(
GDIPCONST
GpMetafile
*
metafile
,
EmfPlusRecordType
recordType
,
UINT
flags
,
UINT
dataSize
,
GDIPCONST
BYTE
*
data
)
{
GpStatus
stat
;
TRACE
(
"(%p,%x,%x,%d,%p)
\n
"
,
metafile
,
recordType
,
flags
,
dataSize
,
data
);
if
(
!
metafile
||
(
dataSize
&&
!
data
)
||
!
metafile
->
playback_graphics
)
...
...
@@ -518,6 +520,8 @@ GpStatus WINGDIPAPI GdipPlayMetafileRecord(GDIPCONST GpMetafile *metafile,
}
else
{
EmfPlusRecordHeader
*
header
=
(
EmfPlusRecordHeader
*
)(
data
)
-
1
;
METAFILE_PlaybackReleaseDC
((
GpMetafile
*
)
metafile
);
switch
(
recordType
)
...
...
@@ -528,6 +532,72 @@ GpStatus WINGDIPAPI GdipPlayMetafileRecord(GDIPCONST GpMetafile *metafile,
case
EmfPlusRecordTypeGetDC
:
METAFILE_PlaybackGetDC
((
GpMetafile
*
)
metafile
);
break
;
case
EmfPlusRecordTypeFillRects
:
{
EmfPlusFillRects
*
record
=
(
EmfPlusFillRects
*
)
header
;
GpBrush
*
brush
,
*
temp_brush
=
NULL
;
GpRectF
*
rects
,
*
temp_rects
=
NULL
;
if
(
dataSize
+
sizeof
(
EmfPlusRecordHeader
)
<
sizeof
(
EmfPlusFillRects
))
return
InvalidParameter
;
if
(
flags
&
0x4000
)
{
if
(
dataSize
+
sizeof
(
EmfPlusRecordHeader
)
<
sizeof
(
EmfPlusFillRects
)
+
sizeof
(
EmfPlusRect
)
*
record
->
Count
)
return
InvalidParameter
;
}
else
{
if
(
dataSize
+
sizeof
(
EmfPlusRecordHeader
)
<
sizeof
(
EmfPlusFillRects
)
+
sizeof
(
GpRectF
)
*
record
->
Count
)
return
InvalidParameter
;
}
if
(
flags
&
0x8000
)
{
stat
=
GdipCreateSolidFill
((
ARGB
)
record
->
BrushID
,
(
GpSolidFill
**
)
&
temp_brush
);
brush
=
temp_brush
;
}
else
{
FIXME
(
"brush deserialization not implemented
\n
"
);
return
NotImplemented
;
}
if
(
stat
==
Ok
)
{
if
(
flags
&
0x4000
)
{
EmfPlusRect
*
int_rects
=
(
EmfPlusRect
*
)(
record
+
1
);
int
i
;
rects
=
temp_rects
=
GdipAlloc
(
sizeof
(
GpRectF
)
*
record
->
Count
);
if
(
rects
)
{
for
(
i
=
0
;
i
<
record
->
Count
;
i
++
)
{
rects
[
i
].
X
=
int_rects
[
i
].
X
;
rects
[
i
].
Y
=
int_rects
[
i
].
Y
;
rects
[
i
].
Width
=
int_rects
[
i
].
Width
;
rects
[
i
].
Height
=
int_rects
[
i
].
Height
;
}
}
else
stat
=
OutOfMemory
;
}
else
rects
=
(
GpRectF
*
)(
record
+
1
);
}
if
(
stat
==
Ok
)
{
stat
=
GdipFillRectangles
(
metafile
->
playback_graphics
,
brush
,
rects
,
record
->
Count
);
}
GdipDeleteBrush
(
temp_brush
);
GdipFree
(
temp_rects
);
return
stat
;
}
default:
FIXME
(
"Not implemented for record type %x
\n
"
,
recordType
);
return
NotImplemented
;
...
...
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