File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -506,6 +506,26 @@ var Graphics = new Class({
506506 return this ;
507507 } ,
508508
509+ /**
510+ * Fill the current path.
511+ *
512+ * This is an alias for `Graphics.fillPath` and does the same thing.
513+ * It was added to match the CanvasRenderingContext 2D API.
514+ *
515+ * @method Phaser.GameObjects.Graphics#fill
516+ * @since 3.16.0
517+ *
518+ * @return {Phaser.GameObjects.Graphics } This Game Object.
519+ */
520+ fill : function ( )
521+ {
522+ this . commandBuffer . push (
523+ Commands . FILL_PATH
524+ ) ;
525+
526+ return this ;
527+ } ,
528+
509529 /**
510530 * Stroke the current path.
511531 *
@@ -527,7 +547,7 @@ var Graphics = new Class({
527547 * Stroke the current path.
528548 *
529549 * This is an alias for `Graphics.strokePath` and does the same thing.
530- * It was added to match calls found in the Canvas API.
550+ * It was added to match the CanvasRenderingContext 2D API.
531551 *
532552 * @method Phaser.GameObjects.Graphics#stroke
533553 * @since 3.16.0
You can’t perform that action at this time.
0 commit comments