We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f1816eb + 2774fab commit ab6066cCopy full SHA for ab6066c
plugins/context2d.js
@@ -681,10 +681,17 @@
681
x = this._wrapX(x);
682
y = this._wrapY(y);
683
684
- //TODO angles and radius need to be transformed
685
- var xpt = this._matrix_map_point(this.ctx._transform, [x, y]);
686
- x = xpt[0];
687
- y = xpt[1];
+ if (!this._matrix_is_identity(this.ctx._transform)) {
+ var xpt = this._matrix_map_point(this.ctx._transform, [x, y]);
+ x = xpt[0];
+ y = xpt[1];
688
+
689
+ var x_radPt0 = this._matrix_map_point(this.ctx._transform, [0, 0]);
690
+ var x_radPt = this._matrix_map_point(this.ctx._transform, [0, radius]);
691
+ radius = Math.sqrt(Math.pow(x_radPt[0] - x_radPt0[0], 2) + Math.pow(x_radPt[1] - x_radPt0[1], 2));
692
693
+ //TODO angles need to be transformed
694
+ }
695
696
var obj = {
697
type: 'arc',
0 commit comments