Defaults should be false for closePath, not true.

This commit is contained in:
Richard Davey 2019-04-08 13:53:03 +01:00
parent 83e3bd313f
commit 9b29001449

View file

@ -1010,7 +1010,7 @@ var Graphics = new Class({
*
* @param {(array|Phaser.Geom.Point[])} points - The points to stroke.
* @param {boolean} [closeShape=false] - When `true`, the shape is closed by joining the last point to the first point.
* @param {boolean} [closePath=true] - When `true`, the path is closed before being stroked.
* @param {boolean} [closePath=false] - When `true`, the path is closed before being stroked.
* @param {integer} [endIndex] - The index of `points` to stop drawing at. Defaults to `points.length`.
*
* @return {Phaser.GameObjects.Graphics} This Game Object.
@ -1018,7 +1018,7 @@ var Graphics = new Class({
strokePoints: function (points, closeShape, closePath, endIndex)
{
if (closeShape === undefined) { closeShape = false; }
if (closePath === undefined) { closePath = true; }
if (closePath === undefined) { closePath = false; }
if (endIndex === undefined) { endIndex = points.length; }
this.beginPath();
@ -1057,7 +1057,7 @@ var Graphics = new Class({
*
* @param {(array|Phaser.Geom.Point[])} points - The points to fill.
* @param {boolean} [closeShape=false] - When `true`, the shape is closed by joining the last point to the first point.
* @param {boolean} [closePath=true] - When `true`, the path is closed before being stroked.
* @param {boolean} [closePath=false] - When `true`, the path is closed before being stroked.
* @param {integer} [endIndex] - The index of `points` to stop at. Defaults to `points.length`.
*
* @return {Phaser.GameObjects.Graphics} This Game Object.
@ -1065,7 +1065,7 @@ var Graphics = new Class({
fillPoints: function (points, closeShape, closePath, endIndex)
{
if (closeShape === undefined) { closeShape = false; }
if (closePath === undefined) { closePath = true; }
if (closePath === undefined) { closePath = false; }
if (endIndex === undefined) { endIndex = points.length; }
this.beginPath();