[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] Alpha blitting problems...answers anyone?
- To: pygame-users@xxxxxxxx
- Subject: [pygame] Alpha blitting problems...answers anyone?
- From: Chris Smith <maximinus@xxxxxxxxx>
- Date: Wed, 30 Mar 2005 23:10:43 +0100
- Delivered-to: archiver@seul.org
- Delivered-to: pygame-users-outgoing@seul.org
- Delivered-to: pygame-users@seul.org
- Delivery-date: Wed, 30 Mar 2005 17:11:10 -0500
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding; b=sPtgqiHtUkkIQgZtuotVeG2V4qabKreiXBZKv9Ojt9Lb6pu6Vj+4VpJ1FZm+Wp1qRp1qOuJg6J9n35/E2QzHCrJXe34T38nDOeixSFW94s+X6R+0oPolHiPIn9t9ozUmyftB5iVmcbuvEKBPNN9KBR67oHC5DEg6GNHmr12TG2A=
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
Hi all.
I'm having trouble blitting some simple alpha surfaces. In my game, I
do this to get an alpha:
image=pygame.Surface((x,y),SWSURFACE|SRCALPHA,32)
image.set_alpha(128)
image.fill((128,83,83))
so i should have a red that blends 50% with another surface - then I
blit it with
screen.blit(handle.menu[index].highlight,(x,y,w,h))
pygame.display.update((x,y,w,h))
- but i get a solid block of red. What am I doing wrong?
Sparky
--
Science is open source religion