[9/9] gdiplus: added GdipAddPathBeziers
Evan Stade
estade at gmail.com
Mon Jul 16 21:45:19 CDT 2007
Hi,
dlls/gdiplus/gdiplus.spec | 2 +-
dlls/gdiplus/graphicspath.c | 27 +++++++++++++++++++++++++++
include/gdiplusflat.h | 1 +
3 files changed, 29 insertions(+), 1 deletions(-)
--
Evan Stade
-------------- next part --------------
diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index 81e5940..cc64b98 100644
--- a/dlls/gdiplus/gdiplus.spec
+++ b/dlls/gdiplus/gdiplus.spec
@@ -2,7 +2,7 @@
@ stub GdipAddPathArcI
@ stub GdipAddPathBezier
@ stub GdipAddPathBezierI
-@ stub GdipAddPathBeziers
+@ stdcall GdipAddPathBeziers(ptr ptr long)
@ stub GdipAddPathBeziersI
@ stub GdipAddPathClosedCurve2
@ stub GdipAddPathClosedCurve2I
diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c
index 5b0e502..d059482 100644
--- a/dlls/gdiplus/graphicspath.c
+++ b/dlls/gdiplus/graphicspath.c
@@ -94,6 +94,33 @@ GpStatus WINGDIPAPI GdipAddPathArc(GpPat
return Ok;
}
+GpStatus WINGDIPAPI GdipAddPathBeziers(GpPath *path, GDIPCONST GpPointF *points,
+ INT count)
+{
+ INT i, old_count;
+
+ if(!path || !points || ((count - 1) % 3))
+ return InvalidParameter;
+
+ if(!lengthen_path(path, count))
+ return OutOfMemory;
+
+ old_count = path->pathdata.Count;
+
+ for(i = 0; i < count; i++){
+ path->pathdata.Points[old_count + i].X = points[i].X;
+ path->pathdata.Points[old_count + i].Y = points[i].Y;
+ path->pathdata.Types[old_count + i] = PathPointTypeBezier;
+ }
+
+ path->pathdata.Types[old_count] =
+ (path->newfigure ? PathPointTypeStart : PathPointTypeLine);
+ path->newfigure = FALSE;
+ path->pathdata.Count += count;
+
+ return Ok;
+}
+
GpStatus WINGDIPAPI GdipAddPathLine2(GpPath *path, GDIPCONST GpPointF *points,
INT count)
{
diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h
index 35a6058..fb760f0 100644
--- a/include/gdiplusflat.h
+++ b/include/gdiplusflat.h
@@ -65,6 +65,7 @@ GpStatus WINGDIPAPI GdipGetBrushType(GpB
GpStatus WINGDIPAPI GdipDeleteBrush(GpBrush*);
GpStatus WINGDIPAPI GdipAddPathArc(GpPath*,REAL,REAL,REAL,REAL,REAL,REAL);
+GpStatus WINGDIPAPI GdipAddPathBeziers(GpPath*,GDIPCONST GpPointF*,INT);
GpStatus WINGDIPAPI GdipAddPathLine2(GpPath*,GDIPCONST GpPointF*,INT);
GpStatus WINGDIPAPI GdipAddPathPath(GpPath*,GDIPCONST GpPath*,BOOL);
GpStatus WINGDIPAPI GdipClosePathFigure(GpPath*);
--
1.4.1
More information about the wine-patches
mailing list