[SDL] SDL Color-masking Blitting?

Solra Bizna sbizna at tejat.net
Mon Feb 4 13:48:12 PST 2008

On Feb 4, 2008 9:58 AM, Taylor Jeude <terinfire at hotmail.com> wrote:
>  I was curious if there was a built-in way to mask a surface and then blit
> it.  Basically, say I have a font or an image, and it is black and white --
> nothing else.  I want to be able to mask the image (say with color
> 255,0,128, so I have a kind of dark red-magenta), and then blit it.  Is
> there a way that is built in?  If not, then am I basically just needing to
> write my own specialized Blit function to do this?  Or if anyone's already
> done this and is kind and doesn't mind divulging some open-source code,
> that'd be pretty cool too!
If it's a paletted image, you can set its palette before blitting. If
it's not, you're in for a fun time...

More information about the SDL mailing list