forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

screen:fillRect() does not work with alpha value on v0.16

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development
View previous topic :: View next topic  
Author Message
Mrdjack



Joined: 27 Feb 2006
Posts: 2

PostPosted: Mon Feb 27, 2006 2:23 am    Post subject: screen:fillRect() does not work with alpha value on v0.16 Reply with quote

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
View user's profile Send private message
romero126



Joined: 24 Dec 2005
Posts: 200

PostPosted: Mon Feb 27, 2006 2:37 pm    Post subject: Reply with quote

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
View user's profile Send private message
Mrdjack



Joined: 27 Feb 2006
Posts: 2

PostPosted: Mon Feb 27, 2006 9:09 pm    Post subject: Reply with quote

thank for your help romero126
++
Back to top
View user's profile Send private message
Shine



Joined: 03 Dec 2004
Posts: 728
Location: Germany

PostPosted: Tue Feb 28, 2006 6:35 am    Post subject: Re: screen:fillRect() does not work with alpha value on v0.1 Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group