gdiplus: Implemented GdipFillClosedCurve2[I].

oldstable
Nikolay Sivov 2008-08-22 02:16:49 +04:00 committed by Alexandre Julliard
parent 3ad8b7ea1a
commit 4a44100aa7
3 changed files with 63 additions and 2 deletions

View File

@ -213,8 +213,8 @@
@ stub GdipEnumerateMetafileSrcRectDestPointsI
@ stub GdipEnumerateMetafileSrcRectDestRect
@ stub GdipEnumerateMetafileSrcRectDestRectI
@ stub GdipFillClosedCurve2
@ stub GdipFillClosedCurve2I
@ stdcall GdipFillClosedCurve2(ptr ptr ptr long long)
@ stdcall GdipFillClosedCurve2I(ptr ptr ptr long long)
@ stub GdipFillClosedCurve
@ stub GdipFillClosedCurveI
@ stdcall GdipFillEllipse(ptr ptr long long long long)

View File

@ -1801,6 +1801,62 @@ GpStatus WINGDIPAPI GdipDrawString(GpGraphics *graphics, GDIPCONST WCHAR *string
return Ok;
}
GpStatus WINGDIPAPI GdipFillClosedCurve2(GpGraphics *graphics, GpBrush *brush,
GDIPCONST GpPointF *points, INT count, REAL tension, GpFillMode fill)
{
GpPath *path;
GpStatus stat;
if(!graphics || !brush || !points)
return InvalidParameter;
stat = GdipCreatePath(fill, &path);
if(stat != Ok)
return stat;
stat = GdipAddPathClosedCurve2(path, points, count, tension);
if(stat != Ok){
GdipDeletePath(path);
return stat;
}
stat = GdipFillPath(graphics, brush, path);
if(stat != Ok){
GdipDeletePath(path);
return stat;
}
GdipDeletePath(path);
return Ok;
}
GpStatus WINGDIPAPI GdipFillClosedCurve2I(GpGraphics *graphics, GpBrush *brush,
GDIPCONST GpPoint *points, INT count, REAL tension, GpFillMode fill)
{
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 = GdipFillClosedCurve2(graphics, brush, ptf, count, tension, fill);
GdipFree(ptf);
return stat;
}
GpStatus WINGDIPAPI GdipFillEllipse(GpGraphics *graphics, GpBrush *brush, REAL x,
REAL y, REAL width, REAL height)
{

View File

@ -132,6 +132,11 @@ GpStatus WINGDIPAPI GdipDrawRectanglesI(GpGraphics*,GpPen*,GDIPCONST GpRect*,INT
GpStatus WINGDIPAPI GdipDrawString(GpGraphics*,GDIPCONST WCHAR*,INT,
GDIPCONST GpFont*,GDIPCONST RectF*, GDIPCONST GpStringFormat*,
GDIPCONST GpBrush*);
GpStatus WINGDIPAPI GdipFillClosedCurve2(GpGraphics*,GpBrush*,GDIPCONST GpPointF*,INT,
REAL,GpFillMode);
GpStatus WINGDIPAPI GdipFillClosedCurve2I(GpGraphics*,GpBrush*,GDIPCONST GpPoint*,INT,
REAL,GpFillMode);
GpStatus WINGDIPAPI GdipFillEllipse(GpGraphics*,GpBrush*,REAL,REAL,REAL,REAL);
GpStatus WINGDIPAPI GdipFillEllipseI(GpGraphics*,GpBrush*,INT,INT,INT,INT);
GpStatus WINGDIPAPI GdipFillPath(GpGraphics*,GpBrush*,GpPath*);