Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-19-2007, 08:40 AM   PM User | #1
name _F1
Regular Coder

 
Join Date: Jun 2006
Posts: 225
Thanks: 6
Thanked 3 Times in 3 Posts
name _F1 is on a distinguished road
Text outlines with GD image library

Is it possible to draw an outline around text that is dynamically generated using the GD image library? It's easy enough to create a shadow-like effect by drawing a second layer of text with a slight variation in dimensions, but I can't work out how to do an outline around the text.

For an example of what I mean, see the text on most of the userbars at http://www.userbars.net/.

EDIT: I achieved an effect like what I wanted by drawing the text four times (y+1,y-1,x+1,x-1) before drawing the actual text. Is this the only/most efficient way to achieve the text outline?

Last edited by name _F1; 03-19-2007 at 08:43 AM..
name _F1 is offline   Reply With Quote
Old 03-19-2007, 10:36 PM   PM User | #2
Inigoesdr
Super Moderator


 
Inigoesdr's Avatar
 
Join Date: Mar 2007
Location: Florida, USA
Posts: 3,604
Thanks: 2
Thanked 399 Times in 392 Posts
Inigoesdr is a jewel in the roughInigoesdr is a jewel in the roughInigoesdr is a jewel in the rough
That's probably the easiest and least likely to cause you problems way of doing it.
Inigoesdr is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:13 AM.


Advertisement
Log in to turn off these ads.