gdiplus: Reimplement GdipDrawArc using GdipDrawPath.
This commit is contained in:
parent
2fd1bf60ae
commit
89f380f69b
@ -2503,9 +2503,8 @@ GpStatus WINGDIPAPI GdipDeleteGraphics(GpGraphics *graphics)
|
|||||||
GpStatus WINGDIPAPI GdipDrawArc(GpGraphics *graphics, GpPen *pen, REAL x,
|
GpStatus WINGDIPAPI GdipDrawArc(GpGraphics *graphics, GpPen *pen, REAL x,
|
||||||
REAL y, REAL width, REAL height, REAL startAngle, REAL sweepAngle)
|
REAL y, REAL width, REAL height, REAL startAngle, REAL sweepAngle)
|
||||||
{
|
{
|
||||||
INT save_state, num_pts;
|
GpStatus status;
|
||||||
GpPointF points[MAX_ARC_PTS];
|
GpPath *path;
|
||||||
GpStatus retval;
|
|
||||||
|
|
||||||
TRACE("(%p, %p, %.2f, %.2f, %.2f, %.2f, %.2f, %.2f)\n", graphics, pen, x, y,
|
TRACE("(%p, %p, %.2f, %.2f, %.2f, %.2f, %.2f, %.2f)\n", graphics, pen, x, y,
|
||||||
width, height, startAngle, sweepAngle);
|
width, height, startAngle, sweepAngle);
|
||||||
@ -2516,21 +2515,15 @@ GpStatus WINGDIPAPI GdipDrawArc(GpGraphics *graphics, GpPen *pen, REAL x,
|
|||||||
if(graphics->busy)
|
if(graphics->busy)
|
||||||
return ObjectBusy;
|
return ObjectBusy;
|
||||||
|
|
||||||
if (!graphics->hdc)
|
status = GdipCreatePath(FillModeAlternate, &path);
|
||||||
{
|
if (status != Ok) return status;
|
||||||
FIXME("graphics object has no HDC\n");
|
|
||||||
return Ok;
|
|
||||||
}
|
|
||||||
|
|
||||||
num_pts = arc2polybezier(points, x, y, width, height, startAngle, sweepAngle);
|
status = GdipAddPathArc(path, x, y, width, height, startAngle, sweepAngle);
|
||||||
|
if (status == Ok)
|
||||||
|
status = GdipDrawPath(graphics, pen, path);
|
||||||
|
|
||||||
save_state = prepare_dc(graphics, pen);
|
GdipDeletePath(path);
|
||||||
|
return status;
|
||||||
retval = draw_polybezier(graphics, pen, points, num_pts, TRUE);
|
|
||||||
|
|
||||||
restore_dc(graphics, save_state);
|
|
||||||
|
|
||||||
return retval;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GpStatus WINGDIPAPI GdipDrawArcI(GpGraphics *graphics, GpPen *pen, INT x,
|
GpStatus WINGDIPAPI GdipDrawArcI(GpGraphics *graphics, GpPen *pen, INT x,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user