Bug #18252 Updated: angle in ImageTTFText now works clockwise

From: Date: Wed, 10 Jul 2002 21:31:38 +0000
Subject: Bug #18252 Updated: angle in ImageTTFText now works clockwise
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-13769@lists.php.net to get a copy of this message
 ID:               18252
 Updated by:       dpetrov@nchcapital.com
 Reported By:      dpetrov@nchcapital.com
 Status:           Closed
 Bug Type:         GD related
 Operating System: FreeBSD 4.6
 PHP Version:      4.2.1
 New Comment:

I installed the latest version of PHP - still same problem.

Apparently, it is somehow related to versions of GD/Freetype I have or
it is something to do with the configuration.


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

[2002-07-09 19:30:39] sniper@php.net

<?php                                                                  
                       
                                                                       
                       
$text = ".          Testing ...";

$im = ImageCreate(600,600);

$blue = ImageColorAllocate($im, 128,128,255);
$black = ImageColorAllocate($im, 0,0,0);
$yel = ImageColorAllocate($im, 255,255,0);
$wh = ImageColorAllocate($im, 255,255,255);
$gr = ImageColorAllocate($im, 0,255,0);

imageFilledRectangle($im, 0, 0, 599, 159, $blue);
                
for ($a=0; $a <= 180 ; $a=$a+20) {
    ImageTtfText($im, 12, $a, 300, 300, $wh,
"/usr/share/fonts/default/TrueType/arial.ttf", $text);
}               

header("Content-Type: image/png");
ImagePng($im);
ImageDestroy($im);
  
  
?>

This script produces nice half of a circle.. No bugs.
In your setup it will draw the lower half of the cirlce.
Please try the snapshot.


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

[2002-07-09 18:59:21] dpetrov@nchcapital.com

So, is it a confirmed bug in 4.2.1 fixed in the CVS or you think it is
an isolated problem on my server?

Could you please send to me a sample image that you get with my script
(with negative angle, so it will be rotated clockwise) or with a
similar script that prints a *multi-line* text?

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

[2002-07-09 18:53:39] sniper@php.net

Apparently fixed since your example writes it as expected.
(opposite of your site's result)


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

[2002-07-09 18:49:13] dpetrov@nchcapital.com

I will try to test it  - but it is going to take some time.

For now, please could you check this script:
http://www.dpetrov.com/misc/ttf/test.php

The source is here:

http://www.dpetrov.com/misc/ttf/test.phps

Another strange thing is that 2 line text now rotated differently too -
before it was rotated as 1 rectangle of 2 lines height, now it is like
each line is moved to the right.

The bigger the angle, the longer the move.

What is the quick and easy way to check if my ImageTTFText is actually
calling ImageFT from GD library or gdTTF from gdttf.c?

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

[2002-07-09 18:33:13] sniper@php.net

I can't reproduce this. Please try this snapshot:

http://snaps.php.net/php4-latest.tar.gz

(setting angle to 90 makes the text to be readable when you bend your
head to left..)




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

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/18252

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



Thread (17 messages)

« previous php.bugs (#13769) next »