Nikolay Sivov : gdiplus: Implemented GdipAddPathClosedCurve2I using GdipAddPathClosedCurve2.

Alexandre Julliard julliard at winehq.org
Mon Aug 4 08:53:48 CDT 2008


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

Author: Nikolay Sivov <bunglehead at gmail.com>
Date:   Sun Aug  3 02:45:24 2008 +0400

gdiplus: Implemented GdipAddPathClosedCurve2I using GdipAddPathClosedCurve2.

---

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

diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index a84667f..55f87ba 100644
--- a/dlls/gdiplus/gdiplus.spec
+++ b/dlls/gdiplus/gdiplus.spec
@@ -5,7 +5,7 @@
 @ stdcall GdipAddPathBeziers(ptr ptr long)
 @ stdcall GdipAddPathBeziersI(ptr ptr long)
 @ stdcall GdipAddPathClosedCurve2(ptr ptr long long)
-@ stub GdipAddPathClosedCurve2I
+@ stdcall GdipAddPathClosedCurve2I(ptr ptr long long)
 @ stub GdipAddPathClosedCurve
 @ stub GdipAddPathClosedCurveI
 @ stdcall GdipAddPathCurve2(ptr ptr long long)
diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c
index 040e13a..23dce9d 100644
--- a/dlls/gdiplus/graphicspath.c
+++ b/dlls/gdiplus/graphicspath.c
@@ -265,6 +265,32 @@ GpStatus WINGDIPAPI GdipAddPathClosedCurve2(GpPath *path, GDIPCONST GpPointF *po
     return stat;
 }
 
+GpStatus WINGDIPAPI GdipAddPathClosedCurve2I(GpPath *path, GDIPCONST GpPoint *points,
+    INT count, REAL tension)
+{
+    GpPointF *ptf;
+    INT i;
+    GpStatus stat;
+
+    if(!path || !points || count <= 1)
+        return InvalidParameter;
+
+    ptf = GdipAlloc(sizeof(GpPointF)*count);
+    if(!ptf)
+        return OutOfMemory;
+
+    for(i = 0; i < count; i++){
+        ptf[i].X = (REAL)points[i].X;
+        ptf[i].Y = (REAL)points[i].Y;
+    }
+
+    stat = GdipAddPathClosedCurve2(path, ptf, count, tension);
+
+    GdipFree(ptf);
+
+    return stat;
+}
+
 GpStatus WINGDIPAPI GdipAddPathCurve(GpPath *path, GDIPCONST GpPointF *points, INT count)
 {
     if(!path || !points || count <= 1)
diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h
index d9c9188..2cc732f 100644
--- a/include/gdiplusflat.h
+++ b/include/gdiplusflat.h
@@ -247,6 +247,7 @@ GpStatus WINGDIPAPI GdipAddPathBezierI(GpPath*,INT,INT,INT,INT,INT,INT,INT,INT);
 GpStatus WINGDIPAPI GdipAddPathBeziers(GpPath*,GDIPCONST GpPointF*,INT);
 GpStatus WINGDIPAPI GdipAddPathBeziersI(GpPath*,GDIPCONST GpPoint*,INT);
 GpStatus WINGDIPAPI GdipAddPathClosedCurve2(GpPath*,GDIPCONST GpPointF*,INT,REAL);
+GpStatus WINGDIPAPI GdipAddPathClosedCurve2I(GpPath*,GDIPCONST GpPoint*,INT,REAL);
 GpStatus WINGDIPAPI GdipAddPathCurve(GpPath*,GDIPCONST GpPointF*,INT);
 GpStatus WINGDIPAPI GdipAddPathCurveI(GpPath*,GDIPCONST GpPoint*,INT);
 GpStatus WINGDIPAPI GdipAddPathCurve2(GpPath*,GDIPCONST GpPointF*,INT,REAL);




More information about the wine-cvs mailing list