mirror of
https://github.com/photonstorm/phaser
synced 2024-11-17 10:18:42 +00:00
Added fill method.
This commit is contained in:
parent
51223c518a
commit
a6ef139f20
1 changed files with 21 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue