note 20112 added to function.imagettfbbox

From: Date: Fri, 22 Mar 2002 16:17:20 +0000
Subject: note 20112 added to function.imagettfbbox
Groups: php.notes 
Request: Send a blank email to php-notes+get-28081@lists.php.net to get a copy of this message
Correcting a couple of the comments above: 1. The array values _are_ documented correctly (LL, LR, UR, UL). 2. The values are relative to the baseline point (lower left) passed in ImageTTFText. I passed the string "xyzzyXYZZY" at 11 points an 0 angle and got back: (-1,-12) (84,-12) (-1,3) (84,3) Which means the text will start one pixel to the left of the base line point, will rise above the base line point by 12 pixels and will drop below the baseline point by 3 pixels. (remember that Y is 0 at the "top" of the image and some large positive integer at the "bottom" of the image) 3. A non-zero angle _does_ return the proper values. For an angle of 45, with the same example above, I got: (-10,-8) (51,-69) (1,3) (62,-58) As you can see, the thing is angling upward by about 45 degrees; certainly looks like it rotated about the base line point. -- http://www.php.net/manual/en/function.imagettfbbox.php http://master.php.net/manage/user-notes.php?action=edit+20112 http://master.php.net/manage/user-notes.php?action=delete+20112 http://master.php.net/manage/user-notes.php?action=reject+20112

« previous php.notes (#28081) next »