note 21390 rejected from function.imagestring by sander
| From: | sander@php.net | Date: | Sat, 11 May 2002 08:55:45 +0000 |
| Subject: | note 21390 rejected from function.imagestring by sander | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-30462@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);
}