From d0ba8711ff24ee59df9d87423ddb5b85f8c93186 Mon Sep 17 00:00:00 2001 From: Evan Stade Date: Fri, 6 Jul 2007 16:14:24 -0700 Subject: [PATCH] gdiplus: Added GdipClosePathFigures. --- dlls/gdiplus/gdiplus.spec | 2 +- dlls/gdiplus/graphicspath.c | 17 +++++++++++++++++ include/gdiplusflat.h | 1 + 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 8b665fcdd52..1cabb0a69a9 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 c06576cc186..24bc7d9a4b3 100644 --- a/dlls/gdiplus/graphicspath.c +++ b/dlls/gdiplus/graphicspath.c @@ -103,6 +103,23 @@ GpStatus WINGDIPAPI GdipClosePathFigure(GpPath* path) 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 3546883005f..6d3da286d39 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -50,6 +50,7 @@ GpStatus WINGDIPAPI GdipDeleteBrush(GpBrush*); GpStatus WINGDIPAPI GdipAddPathLine2(GpPath*,GDIPCONST GpPointF*,INT); GpStatus WINGDIPAPI GdipClosePathFigure(GpPath*); +GpStatus WINGDIPAPI GdipClosePathFigures(GpPath*); GpStatus WINGDIPAPI GdipCreatePath(GpFillMode,GpPath**); GpStatus WINGDIPAPI GdipDeletePath(GpPath*);