Page 1 of 1

Feature suggestion: Pixel testing

Posted: Tue Nov 18, 2008 2:25 pm
by MHD
returns r,g,b,a values.

This would be useful for physics free games...

Re: Feature suggestion: Pixel testing

Posted: Tue Nov 18, 2008 3:43 pm
by rude
Huh? What? Psuedocode, please.

Re: Feature suggestion: Pixel testing

Posted: Tue Nov 18, 2008 7:49 pm
by subrime
A hypothetical function for this feature might work something like this:

Code: Select all

love.graphics.setColor(0.1,0.2,0.3,0.4)
love.graphics.point(100,200)
r,g,b,a=love.graphics.scan(100,200) -- set r,g,b,a to 0.1,0.2,0.3,0.4
I've only ever needed this kind of functionality when image processing, and to do it point by point in lua is so slow that it's better to put the entire processing function into c. I guess it depends on how much you want to avoid API bloat.

Re: Feature suggestion: Pixel testing

Posted: Tue Nov 18, 2008 11:38 pm
by cag
it's probably going to be slow regardless because love uses textures and hardware image blasting. :(
on the other hand, textures are awesome. :D

...
:) :D ^^ ;) :o :| 8-) :x :shock: :? :cry:

ok, I'm done.