note 38261 deleted from function.imagettfbbox by cmb
| From: | cmb@php.net | Date: | Sun, 04 Dec 2016 12:00:06 +0000 |
| Subject: | note 38261 deleted from function.imagettfbbox by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-208169@lists.php.net to get a copy of this message | ||
Note Submitter: php at deathz0rz dot homeunix dot net
----
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;
}
?>