Skip to content

Commit 3348f5b

Browse files
committed
Added support for drawing filled ellipse to Graphics.
1 parent b17744d commit 3348f5b

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

src/gameobjects/graphics/Graphics.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,26 @@ var Graphics = new Class({
429429

430430
return this.strokePoints(points, true);
431431
},
432+
433+
fillEllipseShape: function (ellipse, smoothness)
434+
{
435+
if (smoothness === undefined) { smoothness = 32; }
436+
437+
var points = ellipse.getPoints(smoothness);
438+
439+
return this.fillPoints(points, true);
440+
},
441+
442+
fillEllipse: function (x, y, width, height, smoothness)
443+
{
444+
if (smoothness === undefined) { smoothness = 32; }
445+
446+
var ellipse = new Ellipse(x, y, width, height);
447+
448+
var points = ellipse.getPoints(smoothness);
449+
450+
return this.fillPoints(points, true);
451+
},
432452

433453
// ARC
434454

0 commit comments

Comments
 (0)