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

[pygame] changing alpha pixels.



Hi,

I'm writting a function to change the alpha pixels of
a surface by adjusting the alpha pixel values by a
percentage.  The percentage can be 25%, 50%, and 75%.

eg, set all the alpha pixels to 25% of what they were.

I don't have the code here(no internet connection at
home for another four days!).  

I'm using Numeric.right_shift to set the values to
25%, and 50%, but I'm not sure how to do 75% in one
pass.  I could add 25%, and 50% together, but that
seems wasteful.

Any ideas on how to do 75% quickly?


__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org