Оптимизации и исправления топов.

This commit is contained in:
CORP\phedor 2018-03-23 12:35:10 +03:00
parent 77fa3dbd5e
commit 0f4b2fb722
25 changed files with 109 additions and 53 deletions

View file

@ -40,7 +40,8 @@ class Tools_Drawing
$first_word = true;
$last_width = 0;
for ($i = 0; $i < count($words); $i++) {
$count = count($words);
for ($i = 0; $i < $count; $i++) {
$item = $words[$i];
$dimensions = imagettfbbox($size, $angle, $font, $current_line . ($first_word ? '' : ' ') . $item);
$line_width = $dimensions[2] - $dimensions[0];