| View previous topic :: View next topic |
| Author |
Message |
Mrdjack
Joined: 27 Feb 2006 Posts: 2
|
Posted: Mon Feb 27, 2006 2:23 am Post subject: screen:fillRect() does not work with alpha value on v0.16 |
|
|
i use lua player v0.16 with 1.5 PSP firmware.
when i do a screen:fillRect(0, 0, 100, 100, Color.new(0, 255, 0, 128)), the screen is fill with a green, but the alpha value isn't correct (full alpha).
but when i do a fillRect with half alpha on an image, and i blit to screen, here the result is good.
why screen:fillRect() with non full alpha doesn't work ?
thank for your help and sorry for my english.
++ |
|
| Back to top |
|
 |
romero126
Joined: 24 Dec 2005 Posts: 200
|
Posted: Mon Feb 27, 2006 2:37 pm Post subject: |
|
|
Alpha is used in a 0-1 ... so
if you want it half alpha use 0.5 as the paramater.
Otherwise anything over 1. is fully Visible and 0 is invisible. |
|
| Back to top |
|
 |
Mrdjack
Joined: 27 Feb 2006 Posts: 2
|
Posted: Mon Feb 27, 2006 9:09 pm Post subject: |
|
|
thank for your help romero126
++ |
|
| Back to top |
|
 |
Shine
Joined: 03 Dec 2004 Posts: 728 Location: Germany
|
Posted: Tue Feb 28, 2006 6:35 am Post subject: Re: screen:fillRect() does not work with alpha value on v0.1 |
|
|
| Mrdjack wrote: | why screen:fillRect() with non full alpha doesn't work ?
|
The screen doesn't support alpha, only images, because Lua Player uses only the source for alpha blitting. And alpha values are integers from 0 to 255. But you can use the 3D functions for setting the alpha blitting mode yourself. |
|
| Back to top |
|
 |
|