Thread: Outline on my text

  1. #1
    For Narnia! Sentral's Avatar
    Join Date
    May 2005
    Location
    Narnia
    Posts
    719

    Outline on my text

    I am using SDL to make a game. I am starting on the menu system, and decided to start with the text. I have a load.cpp and load.h for loading the images and stuff, and also have a color key for 0x00, 0xFF,0x00, this color is magenta. In photoshop I set the background to this color, which in RGB is 255,0,255. I put the text in, and saved it as bmp. When I loaded it in, the magenta was transparent (which is what I wanted) but their was a faint outline of magenta around the text. How can this be solved ? Should I add a black stroke around the text?

  2. #2

    Join Date
    May 2005
    Posts
    1,042
    Could you post a screenshot and code please? I'm not familiar with SDL (but this is probably an easy thing to solve).

    Also, haven't seen you on AIM in a while. I've been making models on my own, I didn't know if you were still interested (I still use the turret and minigun models you made).
    I'm not immature, I'm refined in the opposite direction.

  3. #3
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    Perhaps the font texture is interpolated so the magenta you see isn't exactly 0x00FF00 but perhaps ~0x11EE11 or something?
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  4. #4
    For Narnia! Sentral's Avatar
    Join Date
    May 2005
    Location
    Narnia
    Posts
    719
    Ok, let me see if I can get a picture. The print screen wasnt working, maybe cause i'm using SDL_Delay to keep the window open?

    EDIT- Ok i got it now, Check the attachment
    Last edited by Sentral; 06-05-2006 at 03:48 PM.

  5. #5
    Registered User
    Join Date
    Aug 2003
    Posts
    1,218
    Make sure Antialiasing is not turned on in photoshop when creating these textures.
    STL Util a small headers-only library with various utility functions. Mainly for fun but feedback is welcome.

  6. #6
    For Narnia! Sentral's Avatar
    Join Date
    May 2005
    Location
    Narnia
    Posts
    719
    Aye, sir. That worked perfectly! I can't believe I didn't think of that.

    Bob, you make models of your own!? Oh boy, they must look awesome, because your so 1337! :P I'm always on, I never see you on, did you change your name or something?

  7. #7
    For Narnia! Sentral's Avatar
    Join Date
    May 2005
    Location
    Narnia
    Posts
    719
    I found a tutorial that seems to have helped me with this problem. It's all about sprites, and it adresses the problem I had with the magenta "mist" around my text. The tutorial is here.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Deleting Text from a Text file
    By Daved in forum C++ Programming
    Replies: 5
    Last Post: 11-04-2006, 09:47 PM
  2. struct question
    By caduardo21 in forum Windows Programming
    Replies: 5
    Last Post: 01-31-2005, 04:49 PM
  3. Appending text to an edit control
    By dit6a9 in forum Windows Programming
    Replies: 3
    Last Post: 08-13-2004, 09:52 PM
  4. Scrolling The Text
    By GaPe in forum C Programming
    Replies: 3
    Last Post: 07-14-2002, 04:33 PM
  5. Replies: 1
    Last Post: 07-13-2002, 05:45 PM