diff --git a/src/pixi/primitives/Graphics.js b/src/pixi/primitives/Graphics.js index 0e61107..bc2d8c0 100644 --- a/src/pixi/primitives/Graphics.js +++ b/src/pixi/primitives/Graphics.js @@ -365,9 +365,9 @@ } // check that path contains subpaths - if( this.currentPath.length === 0)this.moveTo(x1, y1); + if( this.currentPath.shape.points.length === 0)this.moveTo(x1, y1); - var points = this.currentPath; + var points = this.currentPath.shape.points; var fromX = points[points.length-2]; var fromY = points[points.length-1]; var a1 = fromY - y1; @@ -376,6 +376,7 @@ var b2 = x2 - x1; var mm = Math.abs(a1 * b2 - b1 * a2); + if (mm < 1.0e-8 || radius === 0) { points.push(x1, y1);