Skip to content

Commit

Permalink
Force return int after round()
Browse files Browse the repository at this point in the history
  • Loading branch information
diegomarty committed May 16, 2022
1 parent 67691cd commit 043d650
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/image/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -1046,8 +1046,8 @@ public function _StrokeTTF($x, $y, $txt, $dir, $paragraph_align, &$aBoundingBox,
}
}

$x = round($x);
$y = round($y);
$x = (int) round($x);
$y = (int) round($y);

imagettftext(
$this->img,
Expand Down Expand Up @@ -1160,8 +1160,8 @@ public function _StrokeTTF($x, $y, $txt, $dir, $paragraph_align, &$aBoundingBox,
$yl = $y - $yadj;
//$xl = $xl- $xadj;

$xl = round($xl);
$yl = round($yl - ($h - $fh) + $fh * $i);
$xl = (int) round($xl);
$yl = (int) round($yl - ($h - $fh) + $fh * $i);

imagettftext(
$this->img,
Expand Down

0 comments on commit 043d650

Please sign in to comment.