Skip to content

Commit

Permalink
Fixed correction of out-of-range radii. Resolves svg#407
Browse files Browse the repository at this point in the history
  • Loading branch information
GreLI committed Aug 5, 2015
1 parent 8ec45b7 commit ece38e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/_transforms.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,8 @@ exports.transformArc = function(arc, transform) {
rot = arc[2] * Math.PI / 180,
cos = Math.cos(rot),
sin = Math.sin(rot),
h = Math.pow(arc[5] * cos - arc[6] * sin, 2) / (4 * a * a) +
Math.pow(arc[5] * sin + arc[6] * cos, 2) / (4 * b * b);
h = Math.pow(arc[5] * cos + arc[6] * sin, 2) / (4 * a * a) +
Math.pow(arc[6] * cos - arc[5] * sin, 2) / (4 * b * b);
if (h > 1) {
h = Math.sqrt(h);
a *= h;
Expand Down
2 changes: 2 additions & 0 deletions test/plugins/convertPathData.11.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ece38e3

Please sign in to comment.