Added fill method.

This commit is contained in:
Richard Davey 2018-11-19 11:10:27 +00:00
parent 51223c518a
commit a6ef139f20

View file

@ -506,6 +506,26 @@ var Graphics = new Class({
return this;
},
/**
* Fill the current path.
*
* This is an alias for `Graphics.fillPath` and does the same thing.
* It was added to match the CanvasRenderingContext 2D API.
*
* @method Phaser.GameObjects.Graphics#fill
* @since 3.16.0
*
* @return {Phaser.GameObjects.Graphics} This Game Object.
*/
fill: function ()
{
this.commandBuffer.push(
Commands.FILL_PATH
);
return this;
},
/**
* Stroke the current path.
*
@ -527,7 +547,7 @@ var Graphics = new Class({
* Stroke the current path.
*
* This is an alias for `Graphics.strokePath` and does the same thing.
* It was added to match calls found in the Canvas API.
* It was added to match the CanvasRenderingContext 2D API.
*
* @method Phaser.GameObjects.Graphics#stroke
* @since 3.16.0