gdiplus: Reimplement GdipDrawBeziers using GdipDrawPath.

This commit is contained in:
Dmitry Timoshkov 2013-02-19 11:45:12 +08:00 committed by Alexandre Julliard
parent 89f380f69b
commit ae8826c43e
1 changed files with 10 additions and 12 deletions

View File

@ -2587,8 +2587,8 @@ GpStatus WINGDIPAPI GdipDrawBezierI(GpGraphics *graphics, GpPen *pen, INT x1,
GpStatus WINGDIPAPI GdipDrawBeziers(GpGraphics *graphics, GpPen *pen, GpStatus WINGDIPAPI GdipDrawBeziers(GpGraphics *graphics, GpPen *pen,
GDIPCONST GpPointF *points, INT count) GDIPCONST GpPointF *points, INT count)
{ {
INT i; GpStatus status;
GpStatus ret; GpPath *path;
TRACE("(%p, %p, %p, %d)\n", graphics, pen, points, count); TRACE("(%p, %p, %p, %d)\n", graphics, pen, points, count);
@ -2598,17 +2598,15 @@ GpStatus WINGDIPAPI GdipDrawBeziers(GpGraphics *graphics, GpPen *pen,
if(graphics->busy) if(graphics->busy)
return ObjectBusy; return ObjectBusy;
for(i = 0; i < floor(count / 4); i++){ status = GdipCreatePath(FillModeAlternate, &path);
ret = GdipDrawBezier(graphics, pen, if (status != Ok) return status;
points[4*i].X, points[4*i].Y,
points[4*i + 1].X, points[4*i + 1].Y,
points[4*i + 2].X, points[4*i + 2].Y,
points[4*i + 3].X, points[4*i + 3].Y);
if(ret != Ok)
return ret;
}
return Ok; status = GdipAddPathBeziers(path, points, count);
if (status == Ok)
status = GdipDrawPath(graphics, pen, path);
GdipDeletePath(path);
return status;
} }
GpStatus WINGDIPAPI GdipDrawBeziersI(GpGraphics *graphics, GpPen *pen, GpStatus WINGDIPAPI GdipDrawBeziersI(GpGraphics *graphics, GpPen *pen,