[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] Problem: difference in surface alpha from pygame 1.7 and 1.8
- To: pygame-users@xxxxxxxx
- Subject: [pygame] Problem: difference in surface alpha from pygame 1.7 and 1.8
- From: Luca <lucafbb@xxxxxxxxx>
- Date: Sun, 14 Dec 2008 12:49:45 +0100
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Sun, 14 Dec 2008 06:49:49 -0500
- 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=Pq5/xmw65xuj2mg5bipfgOQt/wfc2qWUZwUe52mGBow=; b=pStXYV4SZXxeSMYBUt/Ijnhxs0So/CNbo5uFNkhouPHZNu+k6FiBTMUQweNfhSGK+E b2JKejDWn0u0qmkNEXIJZ5899PJrWSkrFDxUxDBtLjTfRpKCB1NSLFyrAj6Q3cHqPiZG 8KPBvtDLGkbXax3SsdkFR9TMw/ONvdxtJFZVM=
- 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=uvBdqjp99e25NBmzTqt0ZD4jDptoFwyXyGqT1oXIG9XmFebbHQoKgLOPJdAiYhaYG/ BEd6gzyLbj6Lgru4fDLAkas7vznjEThYi7qRU11MT6CIxq/tVZyC9Yn8NbsxaxS8cVlc S2ECLBTeu2pQzYiWxq6Suh9rQML6KvB7ZwNv8=
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
Hi all.
Some weeks ago I saw that my game has some problem with pygame 1.8 but
I was using pygame 1.7.
Today I installed 1.8 too and I found the problem.
In my current approach I draw sometimes transparent surfaces with a fill color:
surface = pygame.Surface(size, flags=SRCALPHA, depth=32)
surface.fill( (150,150,150) )
surface.set_alpha( 0 )
Ok, this doens't seems very useful, but I don't want to enter in too
deep details.
However this was working on old 1.7.1 version... If I change the alpha
value later (with surface.set_alpha(100) ), I get a demi-transparent
surface.
On current 1.8 version the alpha value is ignored If I have a fill
color... To get a transparency I need to use a RGBA color... but I'm
almost sure that this wasn't working on pygame 1.7
...so now I have an incompatibility.
Someone can explain me why this is changed? Why the alpha value of a
surface is dropped from the fill color?
--
-- luca