class ChunkyPNG::Canvas

def []=(x, y, color)

Other tags:
    See: #set_pixel -

Raises:
  • (ChunkyPNG::OutOfBounds) - when the coordinates are outside of the

Returns:
  • (Integer) - The new color value for this pixel, i.e.

Parameters:
  • color (Integer) -- The new color for the provided coordinates.
  • y (Integer) -- The y-coordinate of the pixel (row)
  • x (Integer) -- The x-coordinate of the pixel (column)
def []=(x, y, color)
  assert_xy!(x, y)
  @pixels[y * width + x] = ChunkyPNG::Color.parse(color)
end