Skip to content

Commit a0042a0

Browse files
authored
Merge pull request #64 from pshihn/path-arc-bug
Fixed a bug in Arc to Curve convertor
2 parents 2850bd3 + 4ba3eb3 commit a0042a0

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

dist/rough.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -510,8 +510,8 @@ class RoughArcConverter {
510510
var numerator = this._rx * this._rx * this._ry * this._ry - this._rx * this._rx * y1dash * y1dash - this._ry * this._ry * x1dash * x1dash;
511511
if (numerator < 0) {
512512
let s = Math.sqrt(1 - (numerator / (this._rx * this._rx * this._ry * this._ry)));
513-
this._rx = s;
514-
this._ry = s;
513+
this._rx = this._rx * s;
514+
this._ry = this._ry * s;
515515
root = 0;
516516
} else {
517517
root = (largeArcFlag == sweepFlag ? -1.0 : 1.0) *

dist/rough.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/rough.umd.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,8 +513,8 @@ class RoughArcConverter {
513513
var numerator = this._rx * this._rx * this._ry * this._ry - this._rx * this._rx * y1dash * y1dash - this._ry * this._ry * x1dash * x1dash;
514514
if (numerator < 0) {
515515
let s = Math.sqrt(1 - (numerator / (this._rx * this._rx * this._ry * this._ry)));
516-
this._rx = s;
517-
this._ry = s;
516+
this._rx = this._rx * s;
517+
this._ry = this._ry * s;
518518
root = 0;
519519
} else {
520520
root = (largeArcFlag == sweepFlag ? -1.0 : 1.0) *

dist/rough.umd.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "roughjs",
3-
"version": "2.1.2",
3+
"version": "2.1.3",
44
"description": "Create graphics using HTML Canvas or SVG with a hand-drawn, sketchy, appearance.",
55
"main": "dist/rough.umd.js",
66
"jsnext:main": "src/index.js",
@@ -34,4 +34,4 @@
3434
"babel-minify": "^0.3.0",
3535
"rollup": "^0.56.5"
3636
}
37-
}
37+
}

src/path.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,8 @@ export class RoughArcConverter {
304304
var numerator = this._rx * this._rx * this._ry * this._ry - this._rx * this._rx * y1dash * y1dash - this._ry * this._ry * x1dash * x1dash;
305305
if (numerator < 0) {
306306
let s = Math.sqrt(1 - (numerator / (this._rx * this._rx * this._ry * this._ry)));
307-
this._rx = s;
308-
this._ry = s;
307+
this._rx = this._rx * s;
308+
this._ry = this._ry * s;
309309
root = 0;
310310
} else {
311311
root = (largeArcFlag == sweepFlag ? -1.0 : 1.0) *

0 commit comments

Comments
 (0)