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

[pygame] Create alpha surfaces



I've got a little problem with aplha surfaces. I'm trying to create a
new surface which is completely TRANSPARENT to draw onto it antialiased
text, and then return that surface to blit it onto another one, but what
I get is a BLACK surface with the text correctly rendered which doesn't
blit transparently at all. I found a very pathetic way of doing this:

verybig font = pygame.font.Font('arial.ttf', 200)
buf = verybigfont.render("                ", 1, (0,0,0))

which gives me the transparent surface.

But, for sure, there must be a nicer way. Any idea of what I'm doing wrong?

Thanks,

--willem