Alexandre Julliard : gdi32: Add a null driver implementation for Polyline and Polygon.

Alexandre Julliard julliard at winehq.org
Tue Dec 6 15:46:16 CST 2011


Module: wine
Branch: master
Commit: 25e300dcade3653452bfd6dd445abd1836792ed5
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=25e300dcade3653452bfd6dd445abd1836792ed5

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Dec  5 22:29:16 2011 +0100

gdi32: Add a null driver implementation for Polyline and Polygon.

---

 dlls/gdi32/driver.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/dlls/gdi32/driver.c b/dlls/gdi32/driver.c
index 0610347..26048b4 100644
--- a/dlls/gdi32/driver.c
+++ b/dlls/gdi32/driver.c
@@ -477,24 +477,27 @@ static BOOL nulldrv_Pie( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
 
 static BOOL nulldrv_PolyPolygon( PHYSDEV dev, const POINT *points, const INT *counts, UINT polygons )
 {
-    /* FIXME: could be implemented with Polygon */
     return TRUE;
 }
 
 static BOOL nulldrv_PolyPolyline( PHYSDEV dev, const POINT *points, const DWORD *counts, DWORD lines )
 {
-    /* FIXME: could be implemented with Polyline */
     return TRUE;
 }
 
 static BOOL nulldrv_Polygon( PHYSDEV dev, const POINT *points, INT count )
 {
-    return TRUE;
+    INT counts[1] = { count };
+
+    return PolyPolygon( dev->hdc, points, counts, 1 );
 }
 
 static BOOL nulldrv_Polyline( PHYSDEV dev, const POINT *points, INT count )
 {
-    return TRUE;
+    DWORD counts[1] = { count };
+
+    if (count < 0) return FALSE;
+    return PolyPolyline( dev->hdc, points, counts, 1 );
 }
 
 static UINT nulldrv_RealizeDefaultPalette( PHYSDEV dev )




More information about the wine-cvs mailing list