Does it exist? I can’t find it.
My workaround is gross:
- allocate a new surface with alpha
- color that surface with SDL_FillRect
- blit the solid color over my image
- blit my image to the screen
This takes advantage of what seems like a
documented bug, in that RGBA-to-RGBA blits
do not modify alpha. I’m moving way more
pixel data that would be desirable.
I’d like a blit that accepts a color and a
source image. If the source image has alpha,
just use that. Otherwise, use any channel as
the alpha. (plain grey images are smaller)
Under control of the alpha, the given color
is written to the destination image. Being
able to pass a pair of SDL_Rect would be good.