[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] SDL vs. Pygame: Alpha Differences



On Sat, 2006-12-23 at 12:10 -0800, Kamilche wrote:
> In the SDL documentation, it says under 'SDL_SetAlpha':
> 
> "When blitting RGBA->RGBA with SDL_SRCALPHA: The source is alpha-blended 
> with the destination using the source alpha channel. The alpha channel 
> in the destination surface is left untouched. SDL_SRCCOLORKEY is ignored."
> 
> However, in Pygame, the alpha channel IS overwritten. Is there any 
> technique to overcome this, to make it match what is written in the SDL 
> documentation? Or is it a bug in SDL?

Yes, SDL has a special blitter for blending alpha to alpha. You can work
around this by disabling the SRC_ALPHA flag on the source. then it will
work the same as SDL.