note 55437 added to function.imagettfbbox

From: Date: Wed, 03 Aug 2005 17:53:52 +0000
Subject: note 55437 added to function.imagettfbbox
Groups: php.notes 
Request: Send a blank email to php-notes+get-93019@lists.php.net to get a copy of this message
I would modify the last function imageprintWordWrapped() posted below. When it says: // do the actual printing $i = 0; $i should be equal to 1, because if $top is greater than 0, the imagettftext() call will not work for the first element in the $lines array ($top + lineHeight*$i) == $top when $i=0! imagettftext($image, $textSize, 0, $leftStart, $top + $lineHeight * $i, $color, $font, $line); $i++; To sum up, replace // do the actual printing $i = 0; with: // do the actual printing $i = 1; Cheers, Marcelo ---- Manual Page -- http://www.php.net/manual/en/function.imagettfbbox.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+55437 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+55437&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+55437&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+55437&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+55437&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+55437&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+55437&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+55437&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#93019) next »