diff --git a/src/Svg/Tag/Path.php b/src/Svg/Tag/Path.php index 3dce7a6..a2a4c5b 100644 --- a/src/Svg/Tag/Path.php +++ b/src/Svg/Tag/Path.php @@ -449,7 +449,12 @@ function drawArc(SurfaceInterface $surface, $fx, $fy, $coords) $toX = $tx - $fx; $toY = $ty - $fy; - if ($toX + $toY === 0) { + if ((float)($toX + $toY) === 0.0) { + return; + } + + if ((float)abs($rx) == 0.0 || (float)abs($ry) === 0.0) { + $surface->lineTo($tx, $ty); return; }