class ChunkyPNG::Canvas
def []=(x, y, color)
- See: #set_pixel -
Raises:
-
(ChunkyPNG::OutOfBounds)
- when the coordinates are outside of the image's dimensions.
Returns:
-
(Integer)
- The new color value for this pixel, i.e. color.
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