[1/2] gdiplus: GdipAddPathBeziersI
Nikolay Sivov
bunglehead at gmail.com
Thu Apr 24 23:24:26 CDT 2008
Changelog:
- implemented GdipAddPathBeziersI
---
dlls/gdiplus/gdiplus.spec | 2 +-
dlls/gdiplus/graphicspath.c | 25 +++++++++++++++++++++++++
include/gdiplusflat.h | 1 +
3 files changed, 27 insertions(+), 1 deletions(-)
diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index 3905c74..e5504ef 100644
--- a/dlls/gdiplus/gdiplus.spec
+++ b/dlls/gdiplus/gdiplus.spec
@@ -3,7 +3,7 @@
@ stub GdipAddPathBezier
@ stdcall GdipAddPathBezierI(ptr long long long long long long long long)
@ stdcall GdipAddPathBeziers(ptr ptr long)
-@ stub GdipAddPathBeziersI
+@ stdcall GdipAddPathBeziersI(ptr ptr long)
@ stub GdipAddPathClosedCurve2
@ stub GdipAddPathClosedCurve2I
@ stub GdipAddPathClosedCurve
diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c
index d7be43e..8f601f8 100644
--- a/dlls/gdiplus/graphicspath.c
+++ b/dlls/gdiplus/graphicspath.c
@@ -164,6 +164,31 @@ GpStatus WINGDIPAPI GdipAddPathBeziers(GpPath *path, GDIPCONST GpPointF *points,
return Ok;
}
+GpStatus WINGDIPAPI GdipAddPathBeziersI(GpPath *path, GDIPCONST GpPoint *points,
+ INT count)
+{
+ GpPointF *ptsF;
+ GpStatus ret;
+ INT i;
+
+ if(!points || ((count - 1) % 3))
+ return InvalidParameter;
+
+ ptsF = GdipAlloc(sizeof(GpPointF) * count);
+ if(!ptsF)
+ return OutOfMemory;
+
+ for(i = 0; i < count; i++){
+ ptsF[i].X = (REAL)points[i].X;
+ ptsF[i].Y = (REAL)points[i].Y;
+ }
+
+ ret = GdipAddPathBeziers(path, ptsF, count);
+ GdipFree(ptsF);
+
+ return ret;
+}
+
GpStatus WINGDIPAPI GdipAddPathEllipse(GpPath *path, REAL x, REAL y, REAL width,
REAL height)
{
diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h
index 366e8a5..ce125d8 100644
--- a/include/gdiplusflat.h
+++ b/include/gdiplusflat.h
@@ -191,6 +191,7 @@ GpStatus WINGDIPAPI GdipAddPathArc(GpPath*,REAL,REAL,REAL,REAL,REAL,REAL);
GpStatus WINGDIPAPI GdipAddPathArcI(GpPath*,INT,INT,INT,INT,REAL,REAL);
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 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