note 60166 added to function.imageftbbox
| From: | theove-2 at osu1 dot php dot net | Date: | Wed, 28 Dec 2005 15:10:25 +0000 |
| Subject: | note 60166 added to function.imageftbbox | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-100857@lists.php.net to get a copy of this message | ||
ah... the problem between imageftbbox() and imagefttext() lies in the mirroring of the y-axes.
Below you see, for a font-size 16 the boudingboxes of "b", "p" and
"bp":
< b: w=9 h=15
b(0,-1)
b(9,-1)
b(9,-16)
b(0,-16)
< p: w=9 h=16
p(0,4)
p(9,4)
p(9,-12)
p(0,-12)
< bp: w=20 h=20
bp(0,4)
bp(20,4)
bp(20,-16)
bp(0,-16)
If drawing "bp" using imagefttext() at y=0, the the top of "bp" indeed is at
y=-16, and the bottom of "bp" at y=4. (Plus or minus a pixel here and there, because at
y=0 there actually is a vissible pixel.)
----
Manual Page -- http://www.php.net/manual/en/function.imageftbbox.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+60166
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+60166&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+60166&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+60166&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+60166&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+60166&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+60166&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+60166&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+60166&report=yes
Search -- http://master.php.net/manage/user-notes.php