[4/7] gdiplus: added GdipClosePathFigures

Evan Stade estade at gmail.com
Fri Jul 6 18:14:24 CDT 2007


Hi,

 dlls/gdiplus/gdiplus.spec   |    2 +-
 dlls/gdiplus/graphicspath.c |   17 +++++++++++++++++
 include/gdiplusflat.h       |    1 +
 3 files changed, 19 insertions(+), 1 deletions(-)

-- 
Evan Stade
-------------- next part --------------
diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index 8b665fc..1cabb0a 100644
--- a/dlls/gdiplus/gdiplus.spec
+++ b/dlls/gdiplus/gdiplus.spec
@@ -55,7 +55,7 @@
 @ stub GdipCloneRegion
 @ stub GdipCloneStringFormat
 @ stdcall GdipClosePathFigure(ptr)
-@ stub GdipClosePathFigures
+@ stdcall GdipClosePathFigures(ptr)
 @ stub GdipCombineRegionPath
 @ stub GdipCombineRegionRect
 @ stub GdipCombineRegionRectI
diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c
index c06576c..24bc7d9 100644
--- a/dlls/gdiplus/graphicspath.c
+++ b/dlls/gdiplus/graphicspath.c
@@ -103,6 +103,23 @@ GpStatus WINGDIPAPI GdipClosePathFigure(
     return Ok;
 }
 
+GpStatus WINGDIPAPI GdipClosePathFigures(GpPath* path)
+{
+    INT i;
+
+    if(!path)
+        return InvalidParameter;
+
+    for(i = 1; i < path->pathdata.Count; i++){
+        if(path->pathdata.Types[i] == PathPointTypeStart)
+            path->pathdata.Types[i-1] |= PathPointTypeCloseSubpath;
+    }
+
+    path->newfigure = TRUE;
+
+    return Ok;
+}
+
 GpStatus WINGDIPAPI GdipCreatePath(GpFillMode fill, GpPath **path)
 {
     if(!path)
diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h
index 3546883..6d3da28 100644
--- a/include/gdiplusflat.h
+++ b/include/gdiplusflat.h
@@ -50,6 +50,7 @@ GpStatus WINGDIPAPI GdipDeleteBrush(GpBr
 
 GpStatus WINGDIPAPI GdipAddPathLine2(GpPath*,GDIPCONST GpPointF*,INT);
 GpStatus WINGDIPAPI GdipClosePathFigure(GpPath*);
+GpStatus WINGDIPAPI GdipClosePathFigures(GpPath*);
 GpStatus WINGDIPAPI GdipCreatePath(GpFillMode,GpPath**);
 GpStatus WINGDIPAPI GdipDeletePath(GpPath*);
 
-- 
1.4.1


More information about the wine-patches mailing list