[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] Get a transparent Surface
- To: pygame-users@xxxxxxxx
- Subject: [pygame] Get a transparent Surface
- From: Luca <lucafbb@xxxxxxxxx>
- Date: Thu, 24 Apr 2008 17:01:10 +0200
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Thu, 24 Apr 2008 11:01:16 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; bh=Mk1iL8sxYdcsfJDy2FA5fVZt1vjJoYSGDtCn1q5hPqo=; b=h10QmDgKoSQ/WeCa0kPxutNmmKgoD2WT+An2xzQgiRMKjSVwK+nIvtwMNG4ebppy3kq+TEMZQPYN0xZoHwEHWp2UCrxn0d6B2RibJ0H0wrgCPgjlbhbsDga1N8etbGeT+0eNFwDqcOB8ji/ihSY69S7CLfGy7cOI5t1SqnNJ+SU=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=B0VNfKxx9d1IPIKsL5aYfI75it7cgUlQBJwMalMG1uex7+jwGrqHNMr32py6Yv67i4E9ESekfeGqaDBEORQR1MYeiPSq1yZ4CjMHk/moPkQKSdoLr/zlHjrupv6H404NdndXYnGhvnQr0TEnK4yKUJYYW+DNAanYrXd2PUqOiq8=
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
Hi all.
I wanna obtain a transparent surface where I want to use base draw
functions, then blit this surface onto images.
After trying a lot I found only this combination is working:
s2 = pygame.Surface( (250,250), flags=SRCALPHA, depth=32 ).convert_alpha()
s2.fill( (127,127,127,0,) )
In facts I must create a surface, then fill a transparent color on
it... Is this the right way?
--
-- luca