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
a9e4e3b4
Commit
a9e4e3b4
authored
Apr 06, 2016
by
Vincent Povirk
Committed by
Alexandre Julliard
Apr 07, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Implement GdipRecordMetafileStream.
Signed-off-by:
Vincent Povirk
<
vincent@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4ed1b4f5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
7 deletions
+57
-7
gdiplus_private.h
dlls/gdiplus/gdiplus_private.h
+1
-0
graphics.c
dlls/gdiplus/graphics.c
+0
-7
image.c
dlls/gdiplus/image.c
+4
-0
metafile.c
dlls/gdiplus/metafile.c
+52
-0
No files found.
dlls/gdiplus/gdiplus_private.h
View file @
a9e4e3b4
...
...
@@ -343,6 +343,7 @@ struct GpMetafile{
BYTE
*
comment_data
;
DWORD
comment_data_size
;
DWORD
comment_data_length
;
IStream
*
record_stream
;
/* playback */
GpGraphics
*
playback_graphics
;
...
...
dlls/gdiplus/graphics.c
View file @
a9e4e3b4
...
...
@@ -6436,13 +6436,6 @@ GpStatus WINGDIPAPI GdipDrawDriverString(GpGraphics *graphics, GDIPCONST UINT16
brush
,
positions
,
flags
,
matrix
);
}
GpStatus
WINGDIPAPI
GdipRecordMetafileStream
(
IStream
*
stream
,
HDC
hdc
,
EmfType
type
,
GDIPCONST
GpRect
*
frameRect
,
MetafileFrameUnit
frameUnit
,
GDIPCONST
WCHAR
*
desc
,
GpMetafile
**
metafile
)
{
FIXME
(
"(%p %p %d %p %d %p %p): stub
\n
"
,
stream
,
hdc
,
type
,
frameRect
,
frameUnit
,
desc
,
metafile
);
return
NotImplemented
;
}
/*****************************************************************************
* GdipIsVisibleClipEmpty [GDIPLUS.@]
*/
...
...
dlls/gdiplus/image.c
View file @
a9e4e3b4
...
...
@@ -2142,6 +2142,10 @@ static GpStatus free_image_data(GpImage *image)
metafile
->
record_graphics
->
image
=
NULL
;
metafile
->
record_graphics
->
busy
=
TRUE
;
}
if
(
metafile
->
record_stream
)
{
IStream_Release
(
metafile
->
record_stream
);
}
}
else
{
...
...
dlls/gdiplus/metafile.c
View file @
a9e4e3b4
...
...
@@ -308,6 +308,27 @@ GpStatus WINGDIPAPI GdipRecordMetafileI(HDC hdc, EmfType type, GDIPCONST GpRect
return
GdipRecordMetafile
(
hdc
,
type
,
pFrameRectF
,
frameUnit
,
desc
,
metafile
);
}
GpStatus
WINGDIPAPI
GdipRecordMetafileStream
(
IStream
*
stream
,
HDC
hdc
,
EmfType
type
,
GDIPCONST
GpRectF
*
frameRect
,
MetafileFrameUnit
frameUnit
,
GDIPCONST
WCHAR
*
desc
,
GpMetafile
**
metafile
)
{
GpStatus
stat
;
TRACE
(
"(%p %p %d %p %d %p %p)
\n
"
,
stream
,
hdc
,
type
,
frameRect
,
frameUnit
,
desc
,
metafile
);
if
(
!
stream
)
return
InvalidParameter
;
stat
=
GdipRecordMetafile
(
hdc
,
type
,
frameRect
,
frameUnit
,
desc
,
metafile
);
if
(
stat
==
Ok
)
{
(
*
metafile
)
->
record_stream
=
stream
;
IStream_AddRef
(
stream
);
}
return
stat
;
}
GpStatus
METAFILE_GetGraphicsContext
(
GpMetafile
*
metafile
,
GpGraphics
**
result
)
{
GpStatus
stat
;
...
...
@@ -487,6 +508,37 @@ GpStatus METAFILE_GraphicsDeleted(GpMetafile* metafile)
}
}
if
(
stat
==
Ok
&&
metafile
->
record_stream
)
{
BYTE
*
buffer
;
UINT
buffer_size
;
buffer_size
=
GetEnhMetaFileBits
(
metafile
->
hemf
,
0
,
NULL
);
buffer
=
heap_alloc
(
buffer_size
);
if
(
buffer
)
{
HRESULT
hr
;
GetEnhMetaFileBits
(
metafile
->
hemf
,
buffer_size
,
buffer
);
hr
=
IStream_Write
(
metafile
->
record_stream
,
buffer
,
buffer_size
,
NULL
);
if
(
FAILED
(
hr
))
stat
=
hresult_to_status
(
hr
);
heap_free
(
buffer
);
}
else
stat
=
OutOfMemory
;
}
if
(
metafile
->
record_stream
)
{
IStream_Release
(
metafile
->
record_stream
);
metafile
->
record_stream
=
NULL
;
}
return
stat
;
}
...
...
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