diff --git a/src/Svg/Tag/Path.php b/src/Svg/Tag/Path.php index b3d13e6..c79ba65 100644 --- a/src/Svg/Tag/Path.php +++ b/src/Svg/Tag/Path.php @@ -451,7 +451,14 @@ function drawArc(SurfaceInterface $surface, $fx, $fy, $coords) array(), ); - $segsNorm = $this->arcToSegments($tx - $fx, $ty - $fy, $rx, $ry, $large, $sweep, $rot); + $toX = $tx - $fx; + $toY = $ty - $fy; + + if ($toX + $toY === 0) { + return; + } + + $segsNorm = $this->arcToSegments($toX, $toY, $rx, $ry, $large, $sweep, $rot); for ($i = 0, $len = count($segsNorm); $i < $len; $i++) { $segs[$i][0] = $segsNorm[$i][0] + $fx;