note 21390 added to function.imagestring

From: Date: Sat, 11 May 2002 00:51:24 +0000
Subject: note 21390 added to function.imagestring
Groups: php.notes 
Request: Send a blank email to php-notes+get-30450@lists.php.net to get a copy of this message
Well... How exactly DO we write onto image with imagestring with two lines? \n gives the Y thing (not a new line) and the code below doesn't work either :( if (strpos($telep, "\n")) { $stringlineone = substr($telep, 0, strpos($telep, "\n") - 1); $stringlinetwo = substr($telep, strpos($telep, "\n") + 2); $lengtha = strlen($stringlineone) * 6.5; $perca = $lengtha / 141; $agana = (1 - $perca) / 2; $middlea = 141 * $agana; $lengthb = strlen($stringlinetwo) * 6.5; $percb = $lengthb / 141; $aganb = (1 - $percb) / 2; $middleb = 141 * $aganb; imagestring($im, 3, $middlea, 3, $stringlineone, $black); imagestring($im, 3, $middleb, 12, $stringlinetwo, $black); imagepng($im); } -- http://www.php.net/manual/en/function.imagestring.php http://master.php.net/manage/user-notes.php?action=edit+21390 http://master.php.net/manage/user-notes.php?action=delete+21390 http://master.php.net/manage/user-notes.php?action=reject+21390

« previous php.notes (#30450) next »