[SDL] Transparent Font Rendering
skinncode
skinncode at centras.lt
Thu Mar 22 19:57:26 PST 2001
>> ...
>
> It works for me... You have to
>
> SDL_SetAlpha(image, SDL_SRCALPHA|SDL_RLEACCEL, 0);
>
> or something to get SDL to actually use the alpha channel when blitting.
> The same applies to colorkeying; you have to set the color and activate it
> for the source surface, like this:
>
> SDL_SetColorKey(image, SDL_SRCCOLORKEY|SDL_RLEACCEL,
> SDL_MapRGB(tiles->format,255,0,255));
>
> where "255,0,255" is the color to be transparent. (SDL_RLEACCEL is to
> accelerate software blitting.)
>
>
> //David
Thanks!
It worked. Both ttf and transparent png.
--skinncode
More information about the SDL
mailing list