gdiplus: Implemented GdipAddPathCurve2I using GdipAddPathCurve2.

This commit is contained in:
Nikolay Sivov 2008-08-03 02:45:11 +04:00 committed by Alexandre Julliard
parent 169140cc83
commit edfc1968ce
3 changed files with 28 additions and 1 deletions

View File

@ -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

View File

@ -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)
{

View File

@ -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);