Re: Re: center text on image
| From: | Adrian Murphy | Date: | Thu, 14 Feb 2002 21:33:02 +0000 |
| Subject: | Re: Re: center text on image | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-84830@lists.php.net to get a copy of this message | ||
cool, only i can't get it exactly centred in the y position
cos the numbers are baseline related i.e the letter 'y' goes under the
line. any ideas?
----- Original Message -----
From: "J Smith" <dark_panda@hushmail.com>
To: <php-general@lists.php.net>
Sent: Thursday, February 14, 2002 6:48 PM
Subject: [PHP] Re: center text on image
>
> If you're using GD2, try looking at ImageTTFBox() and ImageFTBox().
They'll
> give you the coordinates for a bounding box around the text. Use them in
> relation to the image to center it properly.
>
> J
>
>
>
> Adrian Murphy wrote:
>
> > I was wondering if it's possible to centre text precisely on
> > an image.I'm thinking I need to get the width of of
> > the string in pixels?,take this away from imagesx(image) and
> > devide by 2 to get x value.
> > so has anyone achieved this?
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>