Rinnegatamante / lpp-vita

Lua Player Plus for PSVITA. Documentation on: http://rinnegatamante.github.io/lpp-vita/
GNU General Public License v3.0
180 stars 27 forks source link

Screen.getPixel() #14

Closed ramersonw closed 7 years ago

ramersonw commented 7 years ago

How to use this function?

This sample is correct?

px = 0
while true do
    Graphics.initBlend()
    Screen.clear(Color.new(255,204,0))
    Graphics.debugPrint(200, 5, px, Color.new(255,255,255) )
       Graphics.termBlend()
    Screen.flip()
    px = Screen.getPixel(10,10)
end

I'm getting only negative values

if I put above Screen.flip(), I have the same result

Rinnegatamante commented 7 years ago

The returned value must be parsed with Color funcs (Color.getR, Color.getB, Color.getG, Color.getA).

ramersonw commented 7 years ago

Thanks, I get it now.