|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-06-07 16:44 UTC] pajoye@php.net
[2006-06-08 06:57 UTC] marc dot lazzaro at st dot com
[2007-01-15 12:45 UTC] pajoye@php.net
[2007-01-23 01:00 UTC] php-bugs at lists dot php dot net
[2007-02-27 15:10 UTC] hopka at hopka dot net
[2007-03-01 00:14 UTC] pajoye@php.net
[2007-03-01 11:40 UTC] hopka at hopka dot net
[2007-03-01 11:45 UTC] pajoye@php.net
[2007-03-01 12:00 UTC] hopka at hopka dot net
[2007-03-09 01:00 UTC] php-bugs at lists dot php dot net
[2007-09-28 00:53 UTC] lbayuk at pobox dot com
[2009-03-18 08:42 UTC] pajoye@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 01 05:00:01 2025 UTC |
Description: ------------ Hello, ImageTTFText & ImageTTFBBox don't give accurate rectangle with angle other than 0. I work on a png image. Reproduce code: --------------- $xx = 30;$yy = 200;$tsize = 18;$tangle = 45; $p2 = ImageTTFText ($img, $tsize, $tangle, $xx, $yy, 'blue','C:/Windows/Fonts/arial.ttf',"MAgjpabiT01234567"); $p3 = @ImageTTFBBox($tsize, $tangle,'C:/Windows/Fonts/arial.ttf',"MAgjpabiT01234567"); for($i=0; $i < 4; ++$i) { $p3[$i*2] = round($p3[$i*2]+$xx+0.5); $p3[$i*2+1] = round($p3[$i*2+1]+$yy+0.5); } imageline($img,$p2[0],$p2[1],$p2[2],$p2[3],'red'); imageline($img,$p2[2],$p2[3],$p2[4],$p2[5],'red'); imageline($img,$p2[4],$p2[5],$p2[6],$p2[7],'red'); imageline($img,$p2[6],$p2[7],$p2[0],$p2[1],'red'); Expected result: ---------------- I would expext to draw a rectangle fitting exactly around the drawn text. This is true when angle is 0 but no more when rotating the text. Looks like the surrounding box shift on the left versus the text when angle increase. Actual result: -------------- I only have png image to show. If needed you can contact me by email. Thanks for all your efforts in developping PHP.