[4/4] gdiplus: Add FIXME for EMF records we need to implement.

Vincent Povirk madewokherd at gmail.com
Tue Aug 16 16:00:29 CDT 2016


From: Vincent Povirk <vincent at codeweavers.com>

These records cause state tracking in gdi32, but the state tracking doesn't
work correctly because we didn't pass a DC to EnumEnhMetaFile.

Passing in a DC would complicate the case where a Graphics object has no DC,
and gdi32's changes to the DC transform would interfere with gdiplus drawing
operations. Both of these problems can be theoretically solved, but sadly
coping properly with gdi32 transforms is a long way off for us.

Since the state tracking is all internal to gdi32, and apps can't access
the handle table to play records directly, they shouldn't be able to tell
which approach we use. There are only a few records to implement, so this
way should be faster.

Signed-off-by: Vincent Povirk <vincent at codeweavers.com>
---
 dlls/gdiplus/metafile.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/dlls/gdiplus/metafile.c b/dlls/gdiplus/metafile.c
index 643d3c4..5856d49 100644
--- a/dlls/gdiplus/metafile.c
+++ b/dlls/gdiplus/metafile.c
@@ -1100,6 +1100,26 @@ GpStatus WINGDIPAPI GdipPlayMetafileRecord(GDIPCONST GpMetafile *metafile,
         {
             ENHMETARECORD *record;
 
+            switch (recordType)
+            {
+            case EMR_SETMAPMODE:
+            case EMR_SAVEDC:
+            case EMR_RESTOREDC:
+            case EMR_SETWINDOWORGEX:
+            case EMR_SETWINDOWEXTEX:
+            case EMR_SETVIEWPORTORGEX:
+            case EMR_SETVIEWPORTEXTEX:
+            case EMR_EXTSELECTCLIPRGN:
+            case EMR_SETWORLDTRANSFORM:
+            case EMR_SCALEVIEWPORTEXTEX:
+            case EMR_SCALEWINDOWEXTEX:
+            case EMR_MODIFYWORLDTRANSFORM:
+                FIXME("not implemented for record type %x\n", recordType);
+                break;
+            default:
+                break;
+            }
+
             record = heap_alloc_zero(dataSize + 8);
 
             if (record)
-- 
2.7.4




More information about the wine-patches mailing list