Merge pull request #3166 from Antriel/ellipse-graphics

Added support for drawing filled ellipse to Graphics.
This commit is contained in:
Richard Davey 2018-01-17 12:37:27 +00:00 committed by GitHub
commit f6ada62031
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -429,6 +429,26 @@ var Graphics = new Class({
return this.strokePoints(points, true);
},
fillEllipseShape: function (ellipse, smoothness)
{
if (smoothness === undefined) { smoothness = 32; }
var points = ellipse.getPoints(smoothness);
return this.fillPoints(points, true);
},
fillEllipse: function (x, y, width, height, smoothness)
{
if (smoothness === undefined) { smoothness = 32; }
var ellipse = new Ellipse(x, y, width, height);
var points = ellipse.getPoints(smoothness);
return this.fillPoints(points, true);
},
// ARC