Skip to content

Commit

Permalink
Render a line for a path segment with a radius of zero
Browse files Browse the repository at this point in the history
fixes #97
  • Loading branch information
bsweeney committed Feb 23, 2024
1 parent 964d9a9 commit 0e46722
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Svg/Tag/Path.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 0e46722

Please sign in to comment.