gdiplus: Added GdipAddPathBeziers.

This commit is contained in:
Evan Stade 2007-07-16 19:45:19 -07:00 committed by Alexandre Julliard
parent daf00ab72a
commit 7e19178529
3 changed files with 29 additions and 1 deletions

View File

@ -2,7 +2,7 @@
@ stub GdipAddPathArcI
@ stub GdipAddPathBezier
@ stub GdipAddPathBezierI
@ stub GdipAddPathBeziers
@ stdcall GdipAddPathBeziers(ptr ptr long)
@ stub GdipAddPathBeziersI
@ stub GdipAddPathClosedCurve2
@ stub GdipAddPathClosedCurve2I

View File

@ -94,6 +94,33 @@ GpStatus WINGDIPAPI GdipAddPathArc(GpPath *path, REAL x1, REAL y1, REAL x2,
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)
{

View File

@ -65,6 +65,7 @@ GpStatus WINGDIPAPI GdipGetBrushType(GpBrush*,GpBrushType*);
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*);