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