CANVAS:set_pixel(x, y, color)
Set the pixel value at x, y
to the specified color. This is equivalent to drawing a 1x1 filled rectangle.
Parameters:
x |
The x position pixel |
y |
The y position pixel |
color |
An RGB color value as an integer value |
Example:
-- Place a red dot on the canvas function RedDot(name) local canvas = gre.get_canvas(name) local size = canvas:get_dimensions() local x = size.width / 2 local y = size.height / 2 canvas:set_pixel(x, y, 0xff2244) end