note 76728 added to function.imagettftext
| From: | Borgso at osu1 dot php dot net | Date: | Fri, 27 Jul 2007 23:30:06 +0000 |
| Subject: | note 76728 added to function.imagettftext | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-128996@lists.php.net to get a copy of this message | ||
Right align out of "webmaster at higher-designs dot com" code
<?php
$color = imagecolorallocate($im, 0, 0, 0);
$font = 'visitor.ttf';
$fontsize = "12";
$fontangle = "0";
$imagewidth = imagesx($im);
$imageheight = imagesy($im);
$text = "My right align text";
$box = @imageTTFBbox($fontsize,$fontangle,$font,$text);
$textwidth = abs($box[4] - $box[0]);
$textheight = abs($box[5] - $box[1]);
$xcord = $imagewidth - ($textwidth)-2; // 2 = some space from right side.
$ycord = ($imageheight/2)+($textheight/2);
ImageTTFText ($im, $fontsize, $fontangle, $xcord, $ycord, $black, $font, $text);
?>
----
Server IP: 128.39.198.38
Probable Submitter: 85.221.108.232
----
Manual Page -- http://www.php.net/manual/en/function.imagettftext.php
Edit -- https://master.php.net/note/edit/76728
Del: integrated -- https://master.php.net/note/delete/76728/integrated
Del: useless -- https://master.php.net/note/delete/76728/useless
Del: bad code -- https://master.php.net/note/delete/76728/bad+code
Del: spam -- https://master.php.net/note/delete/76728/spam
Del: non-english -- https://master.php.net/note/delete/76728/non-english
Del: in docs -- https://master.php.net/note/delete/76728/in+docs
Del: other reasons-- https://master.php.net/note/delete/76728
Reject -- https://master.php.net/note/reject/76728
Search -- https://master.php.net/manage/user-notes.php