Hello and welcome to our community! Is this your first visit?
Register
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
    Posts
    225
    Thanks
    6
    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 08:43 AM.

  • #2
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,642
    Thanks
    2
    Thanked 405 Times in 397 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
    •