| View previous topic :: View next topic |
| Author |
Message |
the underminer
Joined: 03 Oct 2005 Posts: 124 Location: Netherlands
|
Posted: Sat Nov 04, 2006 11:23 pm Post subject: Transparancy not working? |
|
|
when I make this new color TitleGreen = Color.new(21,165,69,50)
And then do screen:fillRect(0,0,177,272,TitleGreen)
The underlying image wich I blitted earlier to screen is not visible, while the alpha value is 50. How come? transparancy blitting is available in 0.15, isn't it? _________________ Behold! The Underminer got hold of a PSP |
|
| Back to top |
|
 |
romero126
Joined: 24 Dec 2005 Posts: 200
|
Posted: Sun Nov 05, 2006 5:06 am Post subject: |
|
|
| It doesnt work in 2.0 either. |
|
| Back to top |
|
 |
the underminer
Joined: 03 Oct 2005 Posts: 124 Location: Netherlands
|
Posted: Sun Nov 05, 2006 5:40 pm Post subject: |
|
|
| romero126 wrote: | | It doesnt work in 2.0 either. |
That's just stupid. So there is no version that it works in?
I'll have to use a square image then _________________ Behold! The Underminer got hold of a PSP |
|
| Back to top |
|
 |
romero126
Joined: 24 Dec 2005 Posts: 200
|
Posted: Mon Nov 06, 2006 5:10 am Post subject: |
|
|
| oh it works it just a 0 - 1, On and off. the % transparency must be in the image itself. Its not done through the luaplayer. |
|
| Back to top |
|
 |
SnowyDisposition
Joined: 27 Sep 2006 Posts: 4
|
Posted: Wed Nov 08, 2006 1:34 am Post subject: |
|
|
So you're telling me if I go into Photoshop and create a half-transparent green screen 480x272 and blit it to Lua Player with transparency on, it'll work?
I find this highly unlikely. |
|
| Back to top |
|
 |
Altair
Joined: 20 May 2006 Posts: 76 Location: The Netherlands
|
Posted: Wed Nov 08, 2006 10:47 am Post subject: |
|
|
Hmmm, works for me. If you use this code to fade in and out, it will fade in and out by using transparency and Im on 0.16 (I think).
The code I posted is unaltered and is made by Soulkiller BTW. I tested it in some altered form but it works.
| Code: | credits = Image.load("backgrounds/credits.png")
fader = Image.createEmpty(480,272)
alphaValue = 255
faderColor = Color.new(0,0,0,alphaValue)
fader:clear(faderColor)
while true do
screen:clear()
screen:blit(0,0,credits)
screen:blit(0,0,fader)
if alphaValue > 0 then
alphaValue = alphaValue - 5
else
break
end
faderColor = Color.new(0,0,0,alphaValue)
fader:clear(faderColor)
screen.waitVblankStart()
screen.flip()
end
screen.waitVblankStart(300) -- pause so it dosn't fade in and then imdeiatly fade out
while true do
screen:clear()
screen:blit(0,0,credits)
screen:blit(0,0,fader)
if alphaValue < 255 then
alphaValue = alphaValue + 5
else
break
end
faderColor = Color.new(0,0,0,alphaValue)
fader:clear(faderColor)
screen.waitVblankStart()
screen.flip()
end |
|
|
| Back to top |
|
 |
romero126
Joined: 24 Dec 2005 Posts: 200
|
Posted: Thu Nov 09, 2006 9:53 am Post subject: |
|
|
| SnowyDisposition wrote: | So you're telling me if I go into Photoshop and create a half-transparent green screen 480x272 and blit it to Lua Player with transparency on, it'll work?
I find this highly unlikely. |
Its exactly what Im saying, PNG files are quite usefull to display transparancy. Full but not partial. Douchebag. |
|
| Back to top |
|
 |
the underminer
Joined: 03 Oct 2005 Posts: 124 Location: Netherlands
|
Posted: Fri Nov 10, 2006 11:32 pm Post subject: |
|
|
[removed]
I posted exactly what romero posted so I removed it _________________ Behold! The Underminer got hold of a PSP |
|
| Back to top |
|
 |
|