[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Problem: difference in surface alpha from pygame 1.7 and 1.8
- To: pygame-users@xxxxxxxx
- Subject: Re: [pygame] Problem: difference in surface alpha from pygame 1.7 and 1.8
- From: Luca <lucafbb@xxxxxxxxx>
- Date: Sun, 14 Dec 2008 15:04:36 +0100
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Sun, 14 Dec 2008 09:04:41 -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:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=b/dewYnXhQrTvsoaOFqkbojiwqpCRDxa6gEAtVW7h6w=; b=tmelmip/LKnR1blJbDU8SOuNX+e1xUZdH4QHZOElDc5JDas/QaOFMqz2Wcj4MQGXr/ 7YtyFVe6OKnPO9cXIXivKxt0052nmZH02bf45YTkhSMQTnTEzE6AyNBhzoerzCoChHEo aiRcrxwZ1+4FX/J0Ymr6ZL5i+pPY2FxHzK97Y=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=b9QJJ6LsYySnLp3NXRbjHFyVjuEA3gS4FIBY/TmPYx3RpMHyFaSPkdxhestmkTdY4r mItcT1MDWVo73t3QAc2rBrpHBeV7ZrtKKSDgcfmZdZaUEZ15ctkAQkmPnjUeJH+04bqQ e12WYNSDrkbcy0n0U670ftoCn86ZTx5oMKxz8=
- In-reply-to: <27308d500812140349h3374eaa9wf756dd450006db9e@xxxxxxxxxxxxxx>
- References: <27308d500812140349h3374eaa9wf756dd450006db9e@xxxxxxxxxxxxxx>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
On Sun, Dec 14, 2008 at 12:49 PM, Luca <lucafbb@xxxxxxxxx> wrote:
> 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?
Fixed removing the SRCALPHA flag from the surface... why this difference?
--
-- luca