Просмотр исходного кода

:octocat: that makes more sense

codemasher 6 лет назад
Родитель
Сommit
f33c615ae9
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      examples/QRImageWithText.php

+ 1 - 1
examples/QRImageWithText.php

@@ -88,7 +88,7 @@ class QRImageWithText extends QRImage{
 
 		$fontColor = \imagecolorallocate($this->image, ...$textColor);
 		$w         = \imagefontwidth($textSize);
-		$x         = ($bgWidth - round((strlen($text) * $w))) / 2;
+		$x         =  round(($bgWidth - strlen($text) * $w) / 2);
 
 		// loop through the string and draw the letters
 		foreach(str_split($text) as $i => $chr){