Merge pull request #931 from sapics/path-arc

Fix path.arcTo error
This commit is contained in:
Jürg Lehni 2016-02-14 14:11:52 +01:00
commit 9c9f40d05a

View file

@ -2323,7 +2323,8 @@ new function() { // PostScript-style drawing commands
var radius = Size.read(arguments);
// If rx = 0 or ry = 0 then this arc is treated as a
// straight line joining the endpoints.
if (radius.isZero())
if (Numerical.isZero(radius.width)
|| Numerical.isZero(radius.height))
return this.lineTo(to);
// See for an explanation of the following calculations:
// http://www.w3.org/TR/SVG/implnote.html#ArcImplementationNotes