[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] Create alpha surfaces
- To: pygame-users@xxxxxxxx
- Subject: [pygame] Create alpha surfaces
- From: Willem <willemsh@xxxxxxxxx>
- Date: Tue, 13 Sep 2005 16:08:25 +0200
- Delivered-to: archiver@seul.org
- Delivered-to: pygame-users-outgoing@seul.org
- Delivered-to: pygame-users@seul.org
- Delivery-date: Tue, 13 Sep 2005 10:08:42 -0400
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:user-agent:x-accept-language:mime-version:to:subject:x-enigmail-version:content-type:content-transfer-encoding; b=DuGmG2dmEv6mz7xXsV+NrM0X+dBbP8QEtL7wAyghStqzYfxTmhdSwtUywhgB8fdsLJAE9FOk2rkP1Zo7RQH7prWGMkYqxRCusj09MF9i3ssOb+SHpvGydi+F/Se5n3/R3l/oIPjH89Q6av/pXV3JyiKLuzl/Fgl1AVi0SHEvW5w=
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
- User-agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)
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