gdiplus: Support GdipSetSmoothingMode in metafiles.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Piotr Caban 2017-07-11 17:51:03 +02:00 committed by Alexandre Julliard
parent 147f934103
commit 910975a944
1 changed files with 14 additions and 0 deletions

View File

@ -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;