note 38261 added to function.imagettfbbox

From: Date: Sun, 14 Dec 2003 11:38:37 +0000
Subject: note 38261 added to function.imagettfbbox
Groups: php.notes 
Request: Send a blank email to php-notes+get-61933@lists.php.net to get a copy of this message
The array this function returns is very strange, at least, i think so... So i created this function that 'fixes' the bounding box array into some human-understandable format <?php function fixbbox($bbox) { $xcorr=0-$bbox[6]; //northwest X $ycorr=0-$bbox[7]; //northwest Y $tmp_bbox['left']=$bbox[6]+$xcorr; $tmp_bbox['top']=$bbox[7]+$ycorr; $tmp_bbox['width']=$bbox[2]+$xcorr; $tmp_bbox['height']=$bbox[3]+$ycorr; return $tmp_bbox; } ?> ---- Manual Page -- http://www.php.net/manual/en/function.imagettfbbox.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+38261 Delete -- http://master.php.net/manage/user-notes.php?action=delete+38261&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+38261&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#61933) next »