Skip to content

Commit

Permalink
Merge pull request #64 from pshihn/path-arc-bug
Browse files Browse the repository at this point in the history
Fixed a bug in Arc to Curve convertor
  • Loading branch information
pshihn authored May 12, 2018
2 parents 2850bd3 + 4ba3eb3 commit a0042a0
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions dist/rough.js
Original file line number Diff line number Diff line change
Expand Up @@ -510,8 +510,8 @@ class RoughArcConverter {
var numerator = this._rx * this._rx * this._ry * this._ry - this._rx * this._rx * y1dash * y1dash - this._ry * this._ry * x1dash * x1dash;
if (numerator < 0) {
let s = Math.sqrt(1 - (numerator / (this._rx * this._rx * this._ry * this._ry)));
this._rx = s;
this._ry = s;
this._rx = this._rx * s;
this._ry = this._ry * s;
root = 0;
} else {
root = (largeArcFlag == sweepFlag ? -1.0 : 1.0) *
Expand Down
2 changes: 1 addition & 1 deletion dist/rough.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/rough.umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -513,8 +513,8 @@ class RoughArcConverter {
var numerator = this._rx * this._rx * this._ry * this._ry - this._rx * this._rx * y1dash * y1dash - this._ry * this._ry * x1dash * x1dash;
if (numerator < 0) {
let s = Math.sqrt(1 - (numerator / (this._rx * this._rx * this._ry * this._ry)));
this._rx = s;
this._ry = s;
this._rx = this._rx * s;
this._ry = this._ry * s;
root = 0;
} else {
root = (largeArcFlag == sweepFlag ? -1.0 : 1.0) *
Expand Down
2 changes: 1 addition & 1 deletion dist/rough.umd.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "roughjs",
"version": "2.1.2",
"version": "2.1.3",
"description": "Create graphics using HTML Canvas or SVG with a hand-drawn, sketchy, appearance.",
"main": "dist/rough.umd.js",
"jsnext:main": "src/index.js",
Expand Down Expand Up @@ -34,4 +34,4 @@
"babel-minify": "^0.3.0",
"rollup": "^0.56.5"
}
}
}
4 changes: 2 additions & 2 deletions src/path.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,8 @@ export class RoughArcConverter {
var numerator = this._rx * this._rx * this._ry * this._ry - this._rx * this._rx * y1dash * y1dash - this._ry * this._ry * x1dash * x1dash;
if (numerator < 0) {
let s = Math.sqrt(1 - (numerator / (this._rx * this._rx * this._ry * this._ry)));
this._rx = s;
this._ry = s;
this._rx = this._rx * s;
this._ry = this._ry * s;
root = 0;
} else {
root = (largeArcFlag == sweepFlag ? -1.0 : 1.0) *
Expand Down

0 comments on commit a0042a0

Please sign in to comment.