gdiplus: Implemented GdipDrawBeziers.
This commit is contained in:
parent
1ee3b0fac6
commit
d020474cb5
|
@ -156,8 +156,8 @@
|
||||||
@ stdcall GdipDrawArcI(ptr ptr long long long long long long)
|
@ stdcall GdipDrawArcI(ptr ptr long long long long long long)
|
||||||
@ stdcall GdipDrawBezier(ptr ptr long long long long long long long long)
|
@ stdcall GdipDrawBezier(ptr ptr long long long long long long long long)
|
||||||
@ stdcall GdipDrawBezierI(ptr ptr long long long long long long long long)
|
@ stdcall GdipDrawBezierI(ptr ptr long long long long long long long long)
|
||||||
@ stub GdipDrawBeziers
|
@ stdcall GdipDrawBeziers(ptr ptr ptr long)
|
||||||
@ stub GdipDrawBeziersI
|
@ stdcall GdipDrawBeziersI(ptr ptr ptr long)
|
||||||
@ stub GdipDrawCachedBitmap
|
@ stub GdipDrawCachedBitmap
|
||||||
@ stub GdipDrawClosedCurve2
|
@ stub GdipDrawClosedCurve2
|
||||||
@ stub GdipDrawClosedCurve2I
|
@ stub GdipDrawClosedCurve2I
|
||||||
|
|
|
@ -997,6 +997,54 @@ GpStatus WINGDIPAPI GdipDrawBezierI(GpGraphics *graphics, GpPen *pen, INT x1,
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GpStatus WINGDIPAPI GdipDrawBeziers(GpGraphics *graphics, GpPen *pen,
|
||||||
|
GDIPCONST GpPointF *points, INT count)
|
||||||
|
{
|
||||||
|
INT i;
|
||||||
|
GpStatus ret;
|
||||||
|
|
||||||
|
if(!graphics || !pen || !points || (count <= 0))
|
||||||
|
return InvalidParameter;
|
||||||
|
|
||||||
|
for(i = 0; i < floor(count / 4); i++){
|
||||||
|
ret = GdipDrawBezier(graphics, pen,
|
||||||
|
points[4*i].X, points[4*i].Y,
|
||||||
|
points[4*i + 1].X, points[4*i + 1].Y,
|
||||||
|
points[4*i + 2].X, points[4*i + 2].Y,
|
||||||
|
points[4*i + 3].X, points[4*i + 3].Y);
|
||||||
|
if(ret != Ok)
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
return Ok;
|
||||||
|
}
|
||||||
|
|
||||||
|
GpStatus WINGDIPAPI GdipDrawBeziersI(GpGraphics *graphics, GpPen *pen,
|
||||||
|
GDIPCONST GpPoint *points, INT count)
|
||||||
|
{
|
||||||
|
GpPointF *pts;
|
||||||
|
GpStatus ret;
|
||||||
|
INT i;
|
||||||
|
|
||||||
|
if(!graphics || !pen || !points || (count <= 0))
|
||||||
|
return InvalidParameter;
|
||||||
|
|
||||||
|
pts = GdipAlloc(sizeof(GpPointF) * count);
|
||||||
|
if(!pts)
|
||||||
|
return OutOfMemory;
|
||||||
|
|
||||||
|
for(i = 0; i < count; i++){
|
||||||
|
pts[i].X = (REAL)points[i].X;
|
||||||
|
pts[i].Y = (REAL)points[i].Y;
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = GdipDrawBeziers(graphics,pen,pts,count);
|
||||||
|
|
||||||
|
GdipFree(pts);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
GpStatus WINGDIPAPI GdipDrawCurve(GpGraphics *graphics, GpPen *pen,
|
GpStatus WINGDIPAPI GdipDrawCurve(GpGraphics *graphics, GpPen *pen,
|
||||||
GDIPCONST GpPointF *points, INT count)
|
GDIPCONST GpPointF *points, INT count)
|
||||||
{
|
{
|
||||||
|
|
|
@ -78,6 +78,8 @@ GpStatus WINGDIPAPI GdipDrawArc(GpGraphics*,GpPen*,REAL,REAL,REAL,REAL,REAL,REAL
|
||||||
GpStatus WINGDIPAPI GdipDrawArcI(GpGraphics*,GpPen*,INT,INT,INT,INT,REAL,REAL);
|
GpStatus WINGDIPAPI GdipDrawArcI(GpGraphics*,GpPen*,INT,INT,INT,INT,REAL,REAL);
|
||||||
GpStatus WINGDIPAPI GdipDrawBezier(GpGraphics*,GpPen*,REAL,REAL,REAL,REAL,REAL,REAL,REAL,REAL);
|
GpStatus WINGDIPAPI GdipDrawBezier(GpGraphics*,GpPen*,REAL,REAL,REAL,REAL,REAL,REAL,REAL,REAL);
|
||||||
GpStatus WINGDIPAPI GdipDrawBezierI(GpGraphics*,GpPen*,INT,INT,INT,INT,INT,INT,INT,INT);
|
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 GdipDrawCurve(GpGraphics*,GpPen*,GDIPCONST GpPointF*,INT);
|
GpStatus WINGDIPAPI GdipDrawCurve(GpGraphics*,GpPen*,GDIPCONST GpPointF*,INT);
|
||||||
GpStatus WINGDIPAPI GdipDrawCurveI(GpGraphics*,GpPen*,GDIPCONST GpPoint*,INT);
|
GpStatus WINGDIPAPI GdipDrawCurveI(GpGraphics*,GpPen*,GDIPCONST GpPoint*,INT);
|
||||||
GpStatus WINGDIPAPI GdipDrawCurve2(GpGraphics*,GpPen*,GDIPCONST GpPointF*,INT,REAL);
|
GpStatus WINGDIPAPI GdipDrawCurve2(GpGraphics*,GpPen*,GDIPCONST GpPointF*,INT,REAL);
|
||||||
|
|
Loading…
Reference in New Issue