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

Re: [pygame] Transparent surfaces



On Wednesday 27 Apr 2005 9:40 pm, Daniel Dornhardt wrote:
> i ran into the same problem just a few days ago. I got it to work:
> like
>
> image = pygame.Surface([640,480], SRCALPHA, 32)
>
> i don't know if either fill or convert are necessary, though, you'll
> have to try.
>
> I think it's necessary to give the '32', eg. the color depth, or it gets
> it's color depth information from the screen surface, which, per
> definition, isn't transparent, because there can't be something behind it.

Aha! Perfect! Thank you :)

I had tried using SRCALPHA, but I hadn't tried setting the colour depth 
explicitly to 32. Seems like that's the trick!

-- 
James Reeves
http://www.monkeyengines.co.uk/