From 910975a944ca90701381e4acd5eb02b1b345be13 Mon Sep 17 00:00:00 2001 From: Piotr Caban Date: Tue, 11 Jul 2017 17:51:03 +0200 Subject: [PATCH] gdiplus: Support GdipSetSmoothingMode in metafiles. Signed-off-by: Piotr Caban Signed-off-by: Vincent Povirk Signed-off-by: Alexandre Julliard --- dlls/gdiplus/graphics.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index f20178a72e9..277bbd220da 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -5972,6 +5972,20 @@ GpStatus WINGDIPAPI GdipSetSmoothingMode(GpGraphics *graphics, SmoothingMode mod if(graphics->busy) return ObjectBusy; + if(graphics->smoothing == mode) + return Ok; + + if(graphics->image && graphics->image->type == ImageTypeMetafile) { + GpStatus stat; + BOOL antialias = (mode != SmoothingModeDefault && + mode != SmoothingModeNone && mode != SmoothingModeHighSpeed); + + stat = METAFILE_AddSimpleProperty((GpMetafile*)graphics->image, + EmfPlusRecordTypeSetAntiAliasMode, (mode << 1) + antialias); + if(stat != Ok) + return stat; + } + graphics->smoothing = mode; return Ok;