Method: Processing::Image#get
- Defined in:
- lib/processing/image.rb
#get(x, y) ⇒ Integer
Returns the color of the pixel.
75 76 77 78 79 |
# File 'lib/processing/image.rb', line 75 def get(x, y) getInternal__.bitmap[x, y] .map {|n| (n * 255).to_i.clamp 0, 255} .then {|r, g, b, a| self.class.toColor__ r, g, b, a} end |