Method: Processing::Image#set

Defined in:
lib/processing/image.rb

#set(x, y, c) ⇒ nil

Sets the color of the pixel.

Parameters:

  • x (Integer)

    x position of the pixel

  • y (Integer)

    y position of the pixel

  • c (Integer)

    color value

Returns:

  • (nil)

    nil

See Also:



63
64
65
66
# File 'lib/processing/image.rb', line 63

def set(x, y, c)
  getInternal__.bitmap(true)[x, y] = self.class.fromColor__(c).map {|n| n / 255.0}
  nil
end