Feature suggestion: Pixel testing

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
MHD
Prole
Posts: 18
Joined: Fri Nov 14, 2008 11:45 pm
Location: Denmark

Feature suggestion: Pixel testing

Post by MHD »

returns r,g,b,a values.

This would be useful for physics free games...
I r awsum at looah ^^
User avatar
rude
Administrator
Posts: 1052
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: Feature suggestion: Pixel testing

Post by rude »

Huh? What? Psuedocode, please.
User avatar
subrime
Citizen
Posts: 76
Joined: Thu Nov 13, 2008 6:18 pm
Location: Australia

Re: Feature suggestion: Pixel testing

Post 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.
User avatar
cag
Citizen
Posts: 65
Joined: Sun Jun 29, 2008 5:09 am

Re: Feature suggestion: Pixel testing

Post 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.
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 226 guests