From f7160291dfbf8b61349526f44a0c72bb4bd28131 Mon Sep 17 00:00:00 2001 From: Piotr Caban Date: Tue, 11 Jul 2017 10:59:03 +0200 Subject: [PATCH] gdiplus: Support GdipSetPixelOffsetMode in metafiles. Signed-off-by: Piotr Caban Signed-off-by: Vincent Povirk Signed-off-by: Alexandre Julliard --- dlls/gdiplus/graphics.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 7a6fcb1778b..f20178a72e9 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -5913,6 +5913,19 @@ GpStatus WINGDIPAPI GdipSetPixelOffsetMode(GpGraphics *graphics, PixelOffsetMode if(graphics->busy) return ObjectBusy; + if(graphics->pixeloffset == mode) + return Ok; + + if(graphics->image && graphics->image->type == ImageTypeMetafile) + { + GpStatus stat; + + stat = METAFILE_AddSimpleProperty((GpMetafile*)graphics->image, + EmfPlusRecordTypeSetPixelOffsetMode, mode); + if(stat != Ok) + return stat; + } + graphics->pixeloffset = mode; return Ok;