Nikolay Sivov : gdiplus: Implemented GdipAddPathCurve2I using GdipAddPathCurve2.
Alexandre Julliard
julliard at winehq.org
Mon Aug 4 08:53:47 CDT 2008
Module: wine
Branch: master
Commit: edfc1968ce783c7fb325f4160f49d3461bb3f265
URL: http://source.winehq.org/git/wine.git/?a=commit;h=edfc1968ce783c7fb325f4160f49d3461bb3f265
Author: Nikolay Sivov <bunglehead at gmail.com>
Date: Sun Aug 3 02:45:11 2008 +0400
gdiplus: 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 976bd3a..a592971 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 bf580b0..8e8930d 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);
More information about the wine-cvs
mailing list