[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[pygame] set_alpha() weirdness.
surface.set_alpha() isn't working the way I expected. I'm not sure if
this is a pygame problem or a more general SDL one, or if my
expectations are simply all screwed up.
I'm changing a surface's alpha value over time. If I go
set_alpha(254), I can later go set_alpha(128) and it works. However,
if I ever go set_alpha(255), further calls to set_alpha() don't have
any effect, _even though_ get_alpha() still retrieves the correct
value. Weird.
Example:
surface.set_alpha(254) # surface is fully opaque
surface.get_alpha() # 254
surface.set_alpha(128) # surface is 50% transparent
surface.get_alpha() # 128
surface.set_alpha(255) # surface is fully opaque
surface.get_alpha() # 255
surface.set_alpha(128) # surface is fully opaque!!! Should be 50%
surface.get_alpha() # 128 reports right value, even though the
# surface is still opaque
David Clark
silenus@telus.net
____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org