It would be nice to have an extra parameter in Canvas::drawCircle method to specify the number of sides as the Polygon does already. The same could be applied to the Canvas::drawEllipse method as well.
Methods would then look like this:
/** Draws a circle. */
public function drawCircle(x:Number, y:Number, radius:Number, numSides:int = -1):void
{
appendPolygon(Polygon.createCircle(x, y, radius, numSides));
}
/** Draws an ellipse. */
public function drawEllipse(x:Number, y:Number, width:Number, height:Number, numSides:int = -1):void
{
var radiusX:Number = width / 2.0;
var radiusY:Number = height / 2.0;
appendPolygon(Polygon.createEllipse(x + radiusX, y + radiusY, radiusX, radiusY, numSides));
}
Hi Daniel,
It would be nice to have an extra parameter in
Canvas::drawCircle
method to specify the number of sides as thePolygon
does already. The same could be applied to theCanvas::drawEllipse
method as well.Methods would then look like this:
What do you think?
Best, Aurélien