diff --git a/src/pixi/primitives/Graphics.js b/src/pixi/primitives/Graphics.js index bc2d8c0..f2d69db 100644 --- a/src/pixi/primitives/Graphics.js +++ b/src/pixi/primitives/Graphics.js @@ -357,16 +357,16 @@ { if( this.currentPath ) { - if(this.currentPath.shape.points.length === 0)this.currentPath.shape.points = [x1, y1]; + if(this.currentPath.shape.points.length === 0) + { + this.currentPath.shape.points.push(x1, y1); + } } else { this.moveTo(x1, y1); } - // check that path contains subpaths - if( this.currentPath.shape.points.length === 0)this.moveTo(x1, y1); - var points = this.currentPath.shape.points; var fromX = points[points.length-2]; var fromY = points[points.length-1]; @@ -379,7 +379,11 @@ if (mm < 1.0e-8 || radius === 0) { - points.push(x1, y1); + if( points[points.length-2] !== x1 || points[points.length-1] !== y1) + { + //console.log(">>") + points.push(x1, y1); + } } else { @@ -423,14 +427,21 @@ { var startX = cx + Math.cos(startAngle) * radius; var startY = cy + Math.sin(startAngle) * radius; - + var points = this.currentPath.shape.points; - if(points.length !== 0 && points[points.length-2] !== startX || points[points.length-1] !== startY) + if(points.length === 0) { this.moveTo(startX, startY); points = this.currentPath.shape.points; } + // else if( points[points.length-2] !== startX || points[points.length-1] !== startY) + // else{ + + + +// } + if (startAngle === endAngle)return this;