GDI: output EMR_POLYGON16 records when possible

Mike McCormack mike at codeweavers.com
Tue Dec 21 02:40:52 CST 2004


We should write EMR_POLYGON16 records when all the polygon's points fit 
into POINTS (short/16bit point) strutures. This reduces the size the 
output EMF and conforms to what Windows does.

Mike


ChangeLog:
* output EMR_POLYGON16 records when possible
-------------- next part --------------
Index: dlls/gdi/enhmfdrv/graphics.c
===================================================================
RCS file: /home/wine/wine/dlls/gdi/enhmfdrv/graphics.c,v
retrieving revision 1.15
diff -u -r1.15 graphics.c
--- dlls/gdi/enhmfdrv/graphics.c	30 Nov 2004 21:38:59 -0000	1.15
+++ dlls/gdi/enhmfdrv/graphics.c	21 Dec 2004 09:27:52 -0000
@@ -459,6 +459,8 @@
 EMFDRV_Polygon( PHYSDEV dev, const POINT* pt, INT count )
 {
     if(count < 2) return FALSE;
+    if( EMFDRV_Polylinegon16( dev, pt, count, EMR_POLYGON16 ) )
+        return TRUE;
     return EMFDRV_Polylinegon( dev, pt, count, EMR_POLYGON );
 }
 


More information about the wine-patches mailing list