diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 0a77d03..a5e6fe8 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -480,7 +480,7 @@ startAngle += Math.PI * 2; } - const sweep = anticlockwise ? (startAngle - endAngle) * -1 : (endAngle - startAngle); + const sweep = anticlockwise ? (startAngle - endAngle) : (endAngle - startAngle); const segs = Math.ceil(Math.abs(sweep) / (Math.PI * 2)) * 40; if (sweep === 0) @@ -491,16 +491,21 @@ const startX = cx + (Math.cos(startAngle) * radius); const startY = cy + (Math.sin(startAngle) * radius); + const points = this.currentPath.shape.points; + if (this.currentPath) { - this.currentPath.shape.points.push(startX, startY); + if (points[points.length - 2] !== startX || points[points.length - 1] !== startY) + { + points.push(startX, startY); + } + } else { this.moveTo(startX, startY); } - const points = this.currentPath.shape.points; const theta = sweep / (segs * 2); const theta2 = theta * 2;