note 65401 added to function.imagettftext
| From: | admin at sgssweb dot com | Date: | Sun, 30 Apr 2006 06:17:24 +0000 |
| Subject: | note 65401 added to function.imagettftext | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-110149@lists.php.net to get a copy of this message | ||
I wrote two classes: PHP Abstract Drawing Toolkit and PHP Graphics, the elements of PHP Font Image
Generator2. An instance of the class Graphics can draw multi-sampling antialiased text, 7 horizontal
alignment of text box (left, center, right, left-adjust, center-adjust, right-adjust, adjust), 3
vertical alignment (top, middle, bottom), and other Java-like methods.
<?php
require_once "package.graphics.php";
$canvas = new Canvas();
$canvas->setSize(400, 400);
$g =& $canvas->getGraphics();
$g->setColor(new Color(0xffffff));
$g->fill();
$g->setColor(new Color(0, 0, 0, 80));
$g->setFont(new Font($_POST['font'], 20));
$g->drawString($_POST['text'], 0, 0, 400, 400, 'center-adjust',
'middle');
$canvas->complete();
$canvas->output();
?>
The class script is here.
http://sgssweb.com/experiments/?file=PHPFontImageGenerator2
----
Server IP: 66.163.161.117
Probable Submitter: 210.20.246.229
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.imagettftext.php
Edit -- http://master.php.net/note/edit/65401
Del: integrated -- http://master.php.net/note/delete/65401/integrated
Del: useless -- http://master.php.net/note/delete/65401/useless
Del: bad code -- http://master.php.net/note/delete/65401/bad+code
Del: spam -- http://master.php.net/note/delete/65401/spam
Del: non-english -- http://master.php.net/note/delete/65401/non-english
Del: in docs -- http://master.php.net/note/delete/65401/in+docs
Del: other reasons-- http://master.php.net/note/delete/65401
Reject -- http://master.php.net/note/reject/65401
Search -- http://master.php.net/manage/user-notes.php