Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jun 2006
    Thanked 3 Times in 3 Posts

    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 09:43 AM.

  2. #2
    Senior Coder Inigoesdr's Avatar
    Join Date
    Mar 2007
    Florida, USA
    Thanked 406 Times in 398 Posts
    That's probably the easiest and least likely to cause you problems way of doing it.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts