mirror of
https://github.com/photonstorm/phaser
synced 2024-12-17 16:43:30 +00:00
Merge pull request #3166 from Antriel/ellipse-graphics
Added support for drawing filled ellipse to Graphics.
This commit is contained in:
commit
f6ada62031
1 changed files with 20 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue