Commit 2ce5be2c authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

gdiplus: Use GdipFillPath to implement GdipFillPie.

parent 4aa99eaf
......@@ -3472,7 +3472,8 @@ GpStatus WINGDIPAPI GdipFillPath(GpGraphics *graphics, GpBrush *brush, GpPath *p
GpStatus WINGDIPAPI GdipFillPie(GpGraphics *graphics, GpBrush *brush, REAL x,
REAL y, REAL width, REAL height, REAL startAngle, REAL sweepAngle)
{
INT save_state;
GpStatus stat;
GpPath *path;
TRACE("(%p, %p, %.2f, %.2f, %.2f, %.2f, %.2f, %.2f)\n",
graphics, brush, x, y, width, height, startAngle, sweepAngle);
......@@ -3483,24 +3484,19 @@ GpStatus WINGDIPAPI GdipFillPie(GpGraphics *graphics, GpBrush *brush, REAL x,
if(graphics->busy)
return ObjectBusy;
if(!graphics->hdc)
{
FIXME("graphics object has no HDC\n");
return Ok;
}
save_state = SaveDC(graphics->hdc);
EndPath(graphics->hdc);
stat = GdipCreatePath(FillModeAlternate, &path);
BeginPath(graphics->hdc);
draw_pie(graphics, x, y, width, height, startAngle, sweepAngle);
EndPath(graphics->hdc);
if (stat == Ok)
{
stat = GdipAddPathPie(path, x, y, width, height, startAngle, sweepAngle);
brush_fill_path(graphics, brush);
if (stat == Ok)
stat = GdipFillPath(graphics, brush, path);
RestoreDC(graphics->hdc, save_state);
GdipDeletePath(path);
}
return Ok;
return stat;
}
GpStatus WINGDIPAPI GdipFillPieI(GpGraphics *graphics, GpBrush *brush, INT x,
......
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