Ok, so I have the standard SDL function that sets the transparency to whatever color I specify. However, the problem alies with text. Whenever I want the transparent color to be the background of the image I want (so it will go away during th blitting process), I set it to the background and past over it. However, I guess not all of it gets taken away and I'm left with an outlined/mixed color with the color I'm using.
One such example is Red Text. I'm trying to make my game options (255, 0, 0) color system (pure red), but I can't get it to stand out because of the weird purple color background. The only other option (which I tried for about 10 minutes than gave up) is to completely outline everything in black, so it's clearly defined whenever shown on screen.
The only problem with this is consistency. there is a lot of blended colors and such on the text, and making every letter look the same with the same outlining would be a challenge!
What are my options?
Thanks,
Jason
SDL and fonts
Started by gardon, Mar 07 2006 04:06 AM
2 replies to this topic
#1
Posted 07 March 2006 - 04:06 AM
#2
Posted 07 March 2006 - 05:36 AM
This probably happens because when the text bitmaps are created in a graphics program, they are antialiased with the background, creating the blended colors. See if your graphics program can create an alpha map (e.g. by drawing exactly the same text in white on a black background). This will give you per-pixel transparency values that you can use to mask a solid color or other texture in the shape of the text while simultaneously blending well with any background.
reedbeta.com - developer blog, OpenGL demos, and other projects
#3
Posted 07 March 2006 - 06:35 AM
ingenious, thank you
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












