Commit fe1782ee authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

gdiplus: Implemented GdipDrawCurve/GdipDrawCurveI.

parent 00cfffbc
......@@ -167,8 +167,8 @@
@ stdcall GdipDrawCurve2I(ptr ptr ptr long long)
@ stub GdipDrawCurve3
@ stub GdipDrawCurve3I
@ stub GdipDrawCurve
@ stub GdipDrawCurveI
@ stdcall GdipDrawCurve(ptr ptr ptr long)
@ stdcall GdipDrawCurveI(ptr ptr ptr long)
@ stub GdipDrawDriverString
@ stub GdipDrawEllipse
@ stub GdipDrawEllipseI
......
......@@ -1006,6 +1006,37 @@ GpStatus WINGDIPAPI GdipDrawBezierI(GpGraphics *graphics, GpPen *pen, INT x1,
return retval;
}
GpStatus WINGDIPAPI GdipDrawCurve(GpGraphics *graphics, GpPen *pen,
GDIPCONST GpPointF *points, INT count)
{
return GdipDrawCurve2(graphics,pen,points,count,1.0);
}
GpStatus WINGDIPAPI GdipDrawCurveI(GpGraphics *graphics, GpPen *pen,
GDIPCONST GpPoint *points, INT count)
{
GpPointF *pointsF;
GpStatus ret;
INT i;
if(!points || count <= 0)
return InvalidParameter;
pointsF = GdipAlloc(sizeof(GpPointF)*count);
if(!pointsF)
return OutOfMemory;
for(i = 0; i < count; i++){
pointsF[i].X = (REAL)points[i].X;
pointsF[i].Y = (REAL)points[i].Y;
}
ret = GdipDrawCurve(graphics,pen,pointsF,count);
GdipFree(pointsF);
return ret;
}
/* Approximates cardinal spline with Bezier curves. */
GpStatus WINGDIPAPI GdipDrawCurve2(GpGraphics *graphics, GpPen *pen,
GDIPCONST GpPointF *points, INT count, REAL tension)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment