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

Re: [pygame] question about transparent surfaces and alpha-value




something like:

def get_alphaed( surf, alpha):

    tmp = Pygame.Surface( surf.get_size(), SRCALPHA, 32)

    tmp.fill( (alpha,alpha,alpha,alpha) )

    tmp.blit( surf, (0,0), surf.get_size(), BLEND_RGBA_MULT)

    return tmp

(untested)

--

claxo