Commit bb16c926 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

gdiplus: Slightly simplify GdipFillClosedCurve2 implementation.

parent 33895828
......@@ -3486,7 +3486,7 @@ GpStatus WINGDIPAPI GdipFillClosedCurve2(GpGraphics *graphics, GpBrush *brush,
GDIPCONST GpPointF *points, INT count, REAL tension, GpFillMode fill)
{
GpPath *path;
GpStatus stat;
GpStatus status;
TRACE("(%p, %p, %p, %d, %.2f, %d)\n", graphics, brush, points,
count, tension, fill);
......@@ -3500,25 +3500,15 @@ GpStatus WINGDIPAPI GdipFillClosedCurve2(GpGraphics *graphics, GpBrush *brush,
if(count == 1) /* Do nothing */
return Ok;
stat = GdipCreatePath(fill, &path);
if(stat != Ok)
return stat;
stat = GdipAddPathClosedCurve2(path, points, count, tension);
if(stat != Ok){
GdipDeletePath(path);
return stat;
}
status = GdipCreatePath(fill, &path);
if (status != Ok) return status;
stat = GdipFillPath(graphics, brush, path);
if(stat != Ok){
GdipDeletePath(path);
return stat;
}
status = GdipAddPathClosedCurve2(path, points, count, tension);
if (status == Ok)
status = GdipFillPath(graphics, brush, path);
GdipDeletePath(path);
return Ok;
return status;
}
GpStatus WINGDIPAPI GdipFillClosedCurve2I(GpGraphics *graphics, GpBrush *brush,
......
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