Huw Davies : gdiplus: Switch to STRETCH_HALFTONE mode before playing a blit record.

Alexandre Julliard julliard at winehq.org
Wed Oct 20 15:58:41 CDT 2021


Module: wine
Branch: master
Commit: 0d8428fbc5e876977520c00d8a87f50d81bb23d2
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=0d8428fbc5e876977520c00d8a87f50d81bb23d2

Author: Huw Davies <huw at codeweavers.com>
Date:   Tue Oct 19 08:45:33 2021 +0100

gdiplus: Switch to STRETCH_HALFTONE mode before playing a blit record.

This is done even if the emf contains a previous EMR_SETSTRETCHBLTMODE
record.

Thanks to Sebastián Aedo for some of the testing.

Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Esme Povirk <esme at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/gdiplus/metafile.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/dlls/gdiplus/metafile.c b/dlls/gdiplus/metafile.c
index d79c939218c..1b4bba18048 100644
--- a/dlls/gdiplus/metafile.c
+++ b/dlls/gdiplus/metafile.c
@@ -2486,6 +2486,9 @@ GpStatus WINGDIPAPI GdipPlayMetafileRecord(GDIPCONST GpMetafile *metafile,
                 record->nSize = dataSize + 8;
                 memcpy(record->dParm, data, dataSize);
 
+                if (record->iType == EMR_BITBLT || record->iType == EMR_STRETCHBLT)
+                    SetStretchBltMode(metafile->playback_dc, STRETCH_HALFTONE);
+
                 if(PlayEnhMetaFileRecord(metafile->playback_dc, metafile->handle_table,
                         record, metafile->handle_count) == 0)
                     ERR("PlayEnhMetaFileRecord failed\n");




More information about the wine-cvs mailing list