[SDL] Font color gradients

Mason Wheeler masonwheeler at yahoo.com
Sat Apr 5 05:12:57 PDT 2008


I've been looking through SDL_TTF, and it looks like the only option available is to render a font in a single, solid color.  How would I do gradients and other custom colorations?  The ideal way would be to use the glyph shapes as "cutouts" in an existing graphic from an SDL_Surface, which would allow custom colors to be defined beforehand.  If this isn't feasible, I'd like to be able to define multiple foreground colors and create a gradient from them.

How would I go about doing something like this?





More information about the SDL mailing list