[6/7] gdiplus: implemented GdipAddPathClosedCurve2I using GdipAddPathClosedCurve2
Nikolay Sivov
bunglehead at gmail.com
Sat Aug 2 17:45:24 CDT 2008
Changelog:
- 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 ba05831..f824cb0 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 a40d713..f159695 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);
--
1.4.4.4
More information about the wine-patches
mailing list