>From 607b85b8aec8293ffcf3e257cc1ceda5448835f3 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Tue, 17 Jan 2012 14:38:15 +1100
Subject: [PATCH] Add EnhMetafile PolyBezier,PolyBezierTo support
To: wine-patches <wine-patches@winehq.org>

---
 dlls/gdi32/enhmfdrv/enhmetafiledrv.h |    3 ++-
 dlls/gdi32/enhmfdrv/graphics.c       |   13 +++++++++++++
 dlls/gdi32/enhmfdrv/init.c           |    4 ++--
 3 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/dlls/gdi32/enhmfdrv/enhmetafiledrv.h b/dlls/gdi32/enhmfdrv/enhmetafiledrv.h
index a1cead5..1362e82 100644
--- a/dlls/gdi32/enhmfdrv/enhmetafiledrv.h
+++ b/dlls/gdi32/enhmfdrv/enhmetafiledrv.h
@@ -144,6 +144,7 @@ extern INT      EMFDRV_StretchDIBits( PHYSDEV dev, INT xDst, INT yDst, INT width
 extern BOOL     EMFDRV_StrokeAndFillPath( PHYSDEV dev ) DECLSPEC_HIDDEN;
 extern BOOL     EMFDRV_StrokePath( PHYSDEV dev ) DECLSPEC_HIDDEN;
 extern BOOL     EMFDRV_WidenPath( PHYSDEV dev ) DECLSPEC_HIDDEN;
-
+extern BOOL     EMFDRV_PolyBezier( PHYSDEV dev, const POINT *pts, DWORD count );
+extern BOOL EMFDRV_PolyBezierTo( PHYSDEV dev, const POINT *pts, DWORD count );
 
 #endif  /* __WINE_METAFILEDRV_H */
diff --git a/dlls/gdi32/enhmfdrv/graphics.c b/dlls/gdi32/enhmfdrv/graphics.c
index 71fd118..c910f3b 100644
--- a/dlls/gdi32/enhmfdrv/graphics.c
+++ b/dlls/gdi32/enhmfdrv/graphics.c
@@ -795,3 +795,16 @@ no_bounds:
     HeapFree( GetProcessHeap(), 0, pemr );
     return ret;
 }
+
+BOOL EMFDRV_PolyBezier( PHYSDEV dev, const POINT *pts, DWORD count )
+{
+    if(count < 2) return FALSE;
+    return EMFDRV_Polylinegon16( dev, pts, count, EMR_POLYBEZIER16 );
+}
+
+
+BOOL EMFDRV_PolyBezierTo( PHYSDEV dev, const POINT *pts, DWORD count )
+{
+    if(count < 2) return FALSE;
+    return EMFDRV_Polylinegon16( dev, pts, count, EMR_POLYBEZIERTO16 );
+}
diff --git a/dlls/gdi32/enhmfdrv/init.c b/dlls/gdi32/enhmfdrv/init.c
index f988ebd..d254cba 100644
--- a/dlls/gdi32/enhmfdrv/init.c
+++ b/dlls/gdi32/enhmfdrv/init.c
@@ -109,8 +109,8 @@ static const struct gdi_dc_funcs EMFDRV_Funcs =
     EMFDRV_PaintRgn,                 /* pPaintRgn */
     EMFDRV_PatBlt,                   /* pPatBlt */
     EMFDRV_Pie,                      /* pPie */
-    NULL,                            /* pPolyBezier */
-    NULL,                            /* pPolyBezierTo */
+    EMFDRV_PolyBezier,               /* pPolyBezier */
+    EMFDRV_PolyBezierTo,             /* pPolyBezierTo */
     NULL,                            /* pPolyDraw */
     EMFDRV_PolyPolygon,              /* pPolyPolygon */
     EMFDRV_PolyPolyline,             /* pPolyPolyline */
-- 
1.7.5.4

