Nikolay Sivov : gdiplus: Implemented GdipAddPathBeziersI.
Alexandre Julliard
julliard at winehq.org
Mon Apr 28 08:00:54 CDT 2008
Module: wine
Branch: master
Commit: c282f248fa2f1461db329fc2279648f957db2844
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c282f248fa2f1461db329fc2279648f957db2844
Author: Nikolay Sivov <bunglehead at gmail.com>
Date: Fri Apr 25 22:16:36 2008 +0400
gdiplus: 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 bdead36..107af12 100644
--- a/dlls/gdiplus/gdiplus.spec
+++ b/dlls/gdiplus/gdiplus.spec
@@ -3,7 +3,7 @@
@ stdcall GdipAddPathBezier(ptr long long long long long long long long)
@ 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 3f83bea..681b785 100644
--- a/dlls/gdiplus/graphicspath.c
+++ b/dlls/gdiplus/graphicspath.c
@@ -171,6 +171,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 8df6c5b..de1125e 100644
--- a/include/gdiplusflat.h
+++ b/include/gdiplusflat.h
@@ -194,6 +194,7 @@ GpStatus WINGDIPAPI GdipAddPathArcI(GpPath*,INT,INT,INT,INT,REAL,REAL);
GpStatus WINGDIPAPI GdipAddPathBezier(GpPath*,REAL,REAL,REAL,REAL,REAL,REAL,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);
More information about the wine-cvs
mailing list