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

Re: [pygame] Overwrite color not alpha?



SDL has some possibly non-intuitive rules about how to do the blit
ased on whether the SDL_SRCALPHA flag is set on the source and whether
the source and dest are RGB or RGBA. I don't know if you can find that
info in the pygame docs or not (anybody know?) but it is in the SDL
documentation for SDL_SetAlpha

here's a random version of that doc page
http://manuals.thexdershome.com/SDL-1.2.5/html/sdlsetalpha.html

So it looks like what you want is to simply blit RGBA to RGBA with
SDL_SRCALPHA on the source - SDL should be leaving the dest alpha
alone

does that get what you want?

On 2/12/06, Kamilche <klachemin@xxxxxxxxxxx> wrote:
> On an RGBA picture, is there a way to quickly fill the RGB portion while
> leaving the A portion untouched? The only way I know how to do it is
> create a new surface and assign the alpha channel with Numeric, but
> that's awfully slow.
>
> --Kamilche
>
>