Commit 4233b828 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

gdiplus: Slightly simplify GdipDrawClosedCurve2 implementation.

parent cc54d1eb
...@@ -2726,7 +2726,7 @@ GpStatus WINGDIPAPI GdipDrawClosedCurve2(GpGraphics *graphics, GpPen *pen, ...@@ -2726,7 +2726,7 @@ GpStatus WINGDIPAPI GdipDrawClosedCurve2(GpGraphics *graphics, GpPen *pen,
GDIPCONST GpPointF *points, INT count, REAL tension) GDIPCONST GpPointF *points, INT count, REAL tension)
{ {
GpPath *path; GpPath *path;
GpStatus stat; GpStatus status;
TRACE("(%p, %p, %p, %d, %.2f)\n", graphics, pen, points, count, tension); TRACE("(%p, %p, %p, %d, %.2f)\n", graphics, pen, points, count, tension);
...@@ -2736,20 +2736,16 @@ GpStatus WINGDIPAPI GdipDrawClosedCurve2(GpGraphics *graphics, GpPen *pen, ...@@ -2736,20 +2736,16 @@ GpStatus WINGDIPAPI GdipDrawClosedCurve2(GpGraphics *graphics, GpPen *pen,
if(graphics->busy) if(graphics->busy)
return ObjectBusy; return ObjectBusy;
if((stat = GdipCreatePath(FillModeAlternate, &path)) != Ok) status = GdipCreatePath(FillModeAlternate, &path);
return stat; if (status != Ok) return status;
stat = GdipAddPathClosedCurve2(path, points, count, tension); status = GdipAddPathClosedCurve2(path, points, count, tension);
if(stat != Ok){ if (status == Ok)
GdipDeletePath(path); status = GdipDrawPath(graphics, pen, path);
return stat;
}
stat = GdipDrawPath(graphics, pen, path);
GdipDeletePath(path); GdipDeletePath(path);
return stat; return status;
} }
GpStatus WINGDIPAPI GdipDrawClosedCurve2I(GpGraphics *graphics, GpPen *pen, GpStatus WINGDIPAPI GdipDrawClosedCurve2I(GpGraphics *graphics, GpPen *pen,
......
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