gdiplus: Added GdipFillPath.

This commit is contained in:
Evan Stade 2007-07-13 20:19:46 -07:00 committed by Alexandre Julliard
parent 9e88347f45
commit d362b58ded
3 changed files with 34 additions and 1 deletions

View File

@ -208,7 +208,7 @@
@ stub GdipFillClosedCurveI
@ stub GdipFillEllipse
@ stub GdipFillEllipseI
@ stub GdipFillPath
@ stdcall GdipFillPath(ptr ptr ptr)
@ stdcall GdipFillPie(ptr ptr long long long long long long)
@ stub GdipFillPieI
@ stub GdipFillPolygon2

View File

@ -785,6 +785,38 @@ GpStatus WINGDIPAPI GdipDrawRectangleI(GpGraphics *graphics, GpPen *pen, INT x,
return Ok;
}
GpStatus WINGDIPAPI GdipFillPath(GpGraphics *graphics, GpBrush *brush, GpPath *path)
{
INT save_state;
GpStatus retval;
if(!brush || !graphics || !path)
return InvalidParameter;
save_state = SaveDC(graphics->hdc);
EndPath(graphics->hdc);
SelectObject(graphics->hdc, brush->gdibrush);
SetPolyFillMode(graphics->hdc, (path->fill == FillModeAlternate ? ALTERNATE
: WINDING));
BeginPath(graphics->hdc);
retval = draw_poly(graphics->hdc, NULL, path->pathdata.Points,
path->pathdata.Types, path->pathdata.Count, FALSE);
if(retval != Ok)
goto end;
EndPath(graphics->hdc);
FillPath(graphics->hdc);
retval = Ok;
end:
RestoreDC(graphics->hdc, save_state);
return retval;
}
GpStatus WINGDIPAPI GdipFillPie(GpGraphics *graphics, GpBrush *brush, REAL x,
REAL y, REAL width, REAL height, REAL startAngle, REAL sweepAngle)
{

View File

@ -44,6 +44,7 @@ GpStatus WINGDIPAPI GdipDrawLines(GpGraphics*,GpPen*,GDIPCONST GpPointF*,INT);
GpStatus WINGDIPAPI GdipDrawPath(GpGraphics*,GpPen*,GpPath*);
GpStatus WINGDIPAPI GdipDrawPie(GpGraphics*,GpPen*,REAL,REAL,REAL,REAL,REAL,REAL);
GpStatus WINGDIPAPI GdipDrawRectangleI(GpGraphics*,GpPen*,INT,INT,INT,INT);
GpStatus WINGDIPAPI GdipFillPath(GpGraphics*,GpBrush*,GpPath*);
GpStatus WINGDIPAPI GdipFillPie(GpGraphics*,GpBrush*,REAL,REAL,REAL,REAL,REAL,REAL);
GpStatus WINGDIPAPI GdipGetCompositingQuality(GpGraphics*,CompositingQuality*);
GpStatus WINGDIPAPI GdipGetInterpolationMode(GpGraphics*,InterpolationMode*);