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

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



sorry, the blit musty be

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

--

claxo

On Wed, Sep 24, 2008 at 2:58 AM, claudio canepa <ccanepacc@xxxxxxxxx> wrote:

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