gdiplus: Implemeted GdipDrawClosedCurve2 and GdipDrawClosedCurve2I.
This commit is contained in:
parent
3e59f9e283
commit
8b8864b727
|
@ -159,8 +159,8 @@
|
|||
@ stdcall GdipDrawBeziers(ptr ptr ptr long)
|
||||
@ stdcall GdipDrawBeziersI(ptr ptr ptr long)
|
||||
@ stub GdipDrawCachedBitmap
|
||||
@ stub GdipDrawClosedCurve2
|
||||
@ stub GdipDrawClosedCurve2I
|
||||
@ stdcall GdipDrawClosedCurve2(ptr ptr ptr long long)
|
||||
@ stdcall GdipDrawClosedCurve2I(ptr ptr ptr long long)
|
||||
@ stub GdipDrawClosedCurve
|
||||
@ stub GdipDrawClosedCurveI
|
||||
@ stdcall GdipDrawCurve2(ptr ptr ptr long long)
|
||||
|
|
|
@ -1045,6 +1045,57 @@ GpStatus WINGDIPAPI GdipDrawBeziersI(GpGraphics *graphics, GpPen *pen,
|
|||
return ret;
|
||||
}
|
||||
|
||||
GpStatus WINGDIPAPI GdipDrawClosedCurve2(GpGraphics *graphics, GpPen *pen,
|
||||
GDIPCONST GpPointF *points, INT count, REAL tension)
|
||||
{
|
||||
GpPointF *ptf;
|
||||
GpStatus stat;
|
||||
|
||||
if(!graphics || !pen || !points || count <= 0)
|
||||
return InvalidParameter;
|
||||
|
||||
/* make a full points copy.. */
|
||||
ptf = GdipAlloc(sizeof(GpPointF)*(count+1));
|
||||
if(!ptf)
|
||||
return OutOfMemory;
|
||||
memcpy(ptf, points, sizeof(GpPointF)*count);
|
||||
|
||||
/* ..and add a first point as a last one */
|
||||
ptf[count] = ptf[0];
|
||||
|
||||
stat = GdipDrawCurve2(graphics, pen, ptf, count + 1, tension);
|
||||
|
||||
GdipFree(ptf);
|
||||
|
||||
return stat;
|
||||
}
|
||||
|
||||
GpStatus WINGDIPAPI GdipDrawClosedCurve2I(GpGraphics *graphics, GpPen *pen,
|
||||
GDIPCONST GpPoint *points, INT count, REAL tension)
|
||||
{
|
||||
GpPointF *ptf;
|
||||
GpStatus stat;
|
||||
INT i;
|
||||
|
||||
if(!points || count <= 0)
|
||||
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 = GdipDrawClosedCurve2(graphics, pen, ptf, count, tension);
|
||||
|
||||
GdipFree(ptf);
|
||||
|
||||
return stat;
|
||||
}
|
||||
|
||||
GpStatus WINGDIPAPI GdipDrawCurve(GpGraphics *graphics, GpPen *pen,
|
||||
GDIPCONST GpPointF *points, INT count)
|
||||
{
|
||||
|
|
|
@ -85,6 +85,8 @@ GpStatus WINGDIPAPI GdipDrawBezier(GpGraphics*,GpPen*,REAL,REAL,REAL,REAL,REAL,R
|
|||
GpStatus WINGDIPAPI GdipDrawBezierI(GpGraphics*,GpPen*,INT,INT,INT,INT,INT,INT,INT,INT);
|
||||
GpStatus WINGDIPAPI GdipDrawBeziers(GpGraphics*,GpPen*,GDIPCONST GpPointF*,INT);
|
||||
GpStatus WINGDIPAPI GdipDrawBeziersI(GpGraphics*,GpPen*,GDIPCONST GpPoint*,INT);
|
||||
GpStatus WINGDIPAPI GdipDrawClosedCurve2(GpGraphics*,GpPen*,GDIPCONST GpPointF*,INT,REAL);
|
||||
GpStatus WINGDIPAPI GdipDrawClosedCurve2I(GpGraphics*,GpPen*,GDIPCONST GpPoint*,INT,REAL);
|
||||
GpStatus WINGDIPAPI GdipDrawCurve(GpGraphics*,GpPen*,GDIPCONST GpPointF*,INT);
|
||||
GpStatus WINGDIPAPI GdipDrawCurveI(GpGraphics*,GpPen*,GDIPCONST GpPoint*,INT);
|
||||
GpStatus WINGDIPAPI GdipDrawCurve2(GpGraphics*,GpPen*,GDIPCONST GpPointF*,INT,REAL);
|
||||
|
|
Loading…
Reference in New Issue