[3/7] gdiplus: implemented GdipAddPathCurve2I using GdipAddPathCurve2
Nikolay Sivov
bunglehead at gmail.com
Sat Aug 2 17:45:11 CDT 2008
Changelog:
- implemented GdipAddPathCurve2I using GdipAddPathCurve2
---
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 87a6454..f7a5b40 100644
--- a/dlls/gdiplus/gdiplus.spec
+++ b/dlls/gdiplus/gdiplus.spec
@@ -9,7 +9,7 @@
@ stub GdipAddPathClosedCurve
@ stub GdipAddPathClosedCurveI
@ stdcall GdipAddPathCurve2(ptr ptr long long)
-@ stub GdipAddPathCurve2I
+@ stdcall GdipAddPathCurve2I(ptr ptr long long)
@ stub GdipAddPathCurve3
@ stub GdipAddPathCurve3I
@ stub GdipAddPathCurve
diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c
index 3d7a891..9ac0356 100644
--- a/dlls/gdiplus/graphicspath.c
+++ b/dlls/gdiplus/graphicspath.c
@@ -247,6 +247,32 @@ GpStatus WINGDIPAPI GdipAddPathCurve2(GpPath *path, GDIPCONST GpPointF *points,
return stat;
}
+GpStatus WINGDIPAPI GdipAddPathCurve2I(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 = GdipAddPathCurve2(path, ptf, count, tension);
+
+ GdipFree(ptf);
+
+ return stat;
+}
+
GpStatus WINGDIPAPI GdipAddPathEllipse(GpPath *path, REAL x, REAL y, REAL width,
REAL height)
{
diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h
index 2928500..da5c930 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 GdipAddPathCurve2(GpPath*,GDIPCONST GpPointF*,INT,REAL);
+GpStatus WINGDIPAPI GdipAddPathCurve2I(GpPath*,GDIPCONST GpPoint*,INT,REAL);
GpStatus WINGDIPAPI GdipAddPathEllipse(GpPath*,REAL,REAL,REAL,REAL);
GpStatus WINGDIPAPI GdipAddPathEllipseI(GpPath*,INT,INT,INT,INT);
GpStatus WINGDIPAPI GdipAddPathLine(GpPath*,REAL,REAL,REAL,REAL);
--
1.4.4.4
More information about the wine-patches
mailing list