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

[pygame] Alpha blending



Has anyone done alpha blending with the surfarray
module and the pixels_alpha() function.  I'm not
exactly sure how it is supposed to work as there isn't
any examples of using an array created from
pixels_alpha() and what i do seems to affect the Green
channel in the same manner that i would like to affect
the Alpha channel.  I have a script that cycles vaules
into an array i got from surfarray.pixels_alpha(). 
The surface that i took the pixels from is a white
square and the square procees to turn yellow as i
decrease the values in my alpha array.

Also, i can't seem to use the RGBA masks in
pygame.Surface to affect the masking of the alpha
channel.  Not calling convert_alpha() will not allow
me to use pixels_alpha() on a surface, and after
calling it my masks are like this
R-0x00FF0000
B-0x0000FF00
G-0x000000FF
A-0xFF000000

I think the pixels_alpha() routine assumes an alpha
mask of 0x000000FF.  How can I affect the alpha
channel of a surface with the surfarray module, and
how do i create surfaces with different RGBA masks?

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/
____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org