diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index ed9d50c058d..ee28b0ea4a3 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 47d5ac5de17..a292483c146 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 57fa6c64f22..1e26c0a9d5d 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*);