ID:               37730
 Updated by:       [EMAIL PROTECTED]
 Reported By:      marc dot lazzaro at st dot com
-Status:           Assigned
+Status:           Feedback
 Bug Type:         GD related
 Operating System: Win XP
 PHP Version:      5.1.4
 Assigned To:      pajoye
 New Comment:

mail to pierre[at]libgd.org.


Previous Comments:
------------------------------------------------------------------------

[2006-06-08 06:57:29] marc dot lazzaro at st dot com

My company policy forbides external access. If you could provide an
email address I will send you the font file. But I have to say that the
behavior remains the same whatever the font is.
Also pls note that I got no errors when the @ is removed.

------------------------------------------------------------------------

[2006-06-07 16:44:58] [EMAIL PROTECTED]

Please provide a link to the font you use. Don't use '@' to hide
possible errors or notices.

------------------------------------------------------------------------

[2006-06-07 15:28:14] marc dot lazzaro at st dot com

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.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=37730&edit=1

Reply via email to