DrawString and alpha workaround? [SOLVED]

Started by Knox, Fri 30/11/2012 21:06:57

Previous topic - Next topic

Knox

Hi guys,

I was wondering: can a user make a custom font that uses "alpha sprites" instead of characters (A, B, C, etc)...and then use the DrawString function to draw transparent pink to dynamic sprites? The text you type would correspond to the various alpha sprites you placed in the font file.
--All that is necessary for evil to triumph is for good men to do nothing.

Khris

You can't put alpha sprites on transparent parts of dynamic sprites, unfortunately. They get blended into "magic pink" if you try.
Calin's AlphaBlend plugin should solve this though.

The other thing is that no, you cannot use DrawString with sprites. You'd have to define which character is represented by which sprite first for instance, and there's no mechanism to do that. You have to do all the font rendering manually.

Crimson Wizard

#2

Knox

lol, wow, must have been on high-grade quality acid! I honestly dont remember that plugin or post, heh. Cool, well uhh...yah I going to recheck that out now. So uhh...yah :)

thnx
--All that is necessary for evil to triumph is for good men to do nothing.

Knox

By the way, I was able to modify a FONT.xx file and added custom alpha sprites (with no semi-transparency mind-you) instead of chars like "o", "p", "q", etc...then I use the DrawString function to "cut" with magic pink those sprites...it works well with what I wanted to do with the mower. Its fast too!
--All that is necessary for evil to triumph is for good men to do nothing.

SMF spam blocked by CleanTalk