Page 1 of 1

DrawFont alternative for RGBA surfaces

PostPosted: Oct 25, 2009 @ 10:06pm
by Nacho84

PostPosted: Oct 26, 2009 @ 9:35am
by edge
Hi Nacho,

Unfortunately, there is no support for text drawing on RGBA surfaces. The only way to handle this is to create your own font renderer and locking surfaces.

PostPosted: Oct 27, 2009 @ 4:18am
by Nacho84
Hi edge,

Thanks for your prompt reply. Just for curiosity's sake: why isn't this feature included in edgelib? I mean, if it's already implemented for RGB surfaces, isn't it the same algorithm for RGBA ones?

Cheers,

--Nacho

PostPosted: Oct 28, 2009 @ 9:16am
by edge
Hi Nacho,

The main difference in blitting RGBA to RGBA would be the included alpha channel. To handle this, two options would be necessary:
- Blitting straight onto the RGBA surface, including the alpha channel (a simple memory copy)
- Read the alpha channel and 'blend them' somehow onto the destination surface