Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/gdiplus/gdiplus.spec | 2 +- dlls/gdiplus/metafile.c | 21 +++++++++++++++++++++ include/gdiplusflat.h | 5 +++-- 3 files changed, 25 insertions(+), 3 deletions(-)
diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index ed9d50c058..ee28b0ea4a 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -451,7 +451,7 @@ 451 stdcall GdipRecordMetafileFileNameI(wstr long long ptr long wstr ptr) 452 stdcall GdipRecordMetafileI(long long ptr long wstr ptr) 453 stdcall GdipRecordMetafileStream(ptr long long ptr long wstr ptr) -454 stub GdipRecordMetafileStreamI +454 stdcall GdipRecordMetafileStreamI(ptr long long ptr long wstr ptr) 455 stdcall GdipReleaseDC(ptr ptr) 456 stdcall GdipRemovePropertyItem(ptr long) 457 stdcall GdipResetClip(ptr) diff --git a/dlls/gdiplus/metafile.c b/dlls/gdiplus/metafile.c index 47d5ac5de1..a292483c14 100644 --- a/dlls/gdiplus/metafile.c +++ b/dlls/gdiplus/metafile.c @@ -859,6 +859,27 @@ GpStatus WINGDIPAPI GdipRecordMetafileI(HDC hdc, EmfType type, GDIPCONST GpRect return GdipRecordMetafile(hdc, type, pFrameRectF, frameUnit, desc, metafile); }
+GpStatus WINGDIPAPI GdipRecordMetafileStreamI(IStream *stream, HDC hdc, EmfType type, GDIPCONST GpRect *frameRect, + MetafileFrameUnit frameUnit, GDIPCONST WCHAR *desc, GpMetafile **metafile) +{ + GpRectF frameRectF, *pFrameRectF; + + TRACE("(%p %p %d %p %d %p %p)\n", stream, hdc, type, frameRect, frameUnit, desc, metafile); + + if (frameRect) + { + frameRectF.X = frameRect->X; + frameRectF.Y = frameRect->Y; + frameRectF.Width = frameRect->Width; + frameRectF.Height = frameRect->Height; + pFrameRectF = &frameRectF; + } + else + pFrameRectF = NULL; + + return GdipRecordMetafileStream(stream, 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) { diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index 57fa6c64f2..1e26c0a9d5 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -284,8 +284,6 @@ GpStatus WINGDIPAPI GdipRecordMetafileFileName(GDIPCONST WCHAR*,HDC,EmfType, GDIPCONST GpRectF*,MetafileFrameUnit,GDIPCONST WCHAR*,GpMetafile**); GpStatus WINGDIPAPI GdipRecordMetafileFileNameI(GDIPCONST WCHAR*,HDC,EmfType, GDIPCONST GpRect*,MetafileFrameUnit,GDIPCONST WCHAR*,GpMetafile**); -GpStatus WINGDIPAPI GdipRecordMetafileI(HDC,EmfType,GDIPCONST GpRect*, - MetafileFrameUnit,GDIPCONST WCHAR*,GpMetafile**); GpStatus WINGDIPAPI GdipReleaseDC(GpGraphics*,HDC); GpStatus WINGDIPAPI GdipResetClip(GpGraphics*); GpStatus WINGDIPAPI GdipResetWorldTransform(GpGraphics*); @@ -549,6 +547,9 @@ GpStatus WINGDIPAPI GdipGetHemfFromMetafile(GpMetafile*,HENHMETAFILE*); GpStatus WINGDIPAPI GdipPlayMetafileRecord(GDIPCONST GpMetafile*,EmfPlusRecordType,UINT,UINT,GDIPCONST BYTE*); GpStatus WINGDIPAPI GdipSetMetafileDownLevelRasterizationLimit(GpMetafile*,UINT); GpStatus WINGDIPAPI GdipRecordMetafile(HDC,EmfType,GDIPCONST GpRectF*,MetafileFrameUnit,GDIPCONST WCHAR*,GpMetafile**); +GpStatus WINGDIPAPI GdipRecordMetafileI(HDC,EmfType,GDIPCONST GpRect*,MetafileFrameUnit,GDIPCONST WCHAR*,GpMetafile**); +GpStatus WINGDIPAPI GdipRecordMetafileStream(IStream*,HDC,EmfType,GDIPCONST GpRectF*,MetafileFrameUnit,GDIPCONST WCHAR *,GpMetafile**); +GpStatus WINGDIPAPI GdipRecordMetafileStreamI(IStream*,HDC,EmfType,GDIPCONST GpRect*,MetafileFrameUnit,GDIPCONST WCHAR *,GpMetafile**);
/* MetafileHeader */ GpStatus WINGDIPAPI GdipGetMetafileHeaderFromEmf(HENHMETAFILE,MetafileHeader*);