[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[pygame] Surface.fill((R,G,B,A)) not working



I initialized a surface this way:

    box1=pygame.Surface((50,50),HWSURFACE|SRCALPHA,32)

and filled it like this:

    box1.fill((128,128,0,128))

I end up with a fully opaque box.  I tried different
display bit depths and combinations of fullscreen,
windowed, and doublebuffered flags as well as
hardware and software surfaces.  None would yield
transparency.




On a sidenote, regarding the map_rgb description, the phrase

"This function is not as needed as normal C code using SDL."

might be better written as

"This function is not as needed as in normal C code using SDL." 
                                   ^^

Didn't realize what it meant till I checked out some
SDL_MapRGB(A) discussions on loki.open-source.sdl.

____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org