Canvas:point(x, y, [ color ] ) method
Draws a point on the Canvas, at the specified position
Parameters
x
A number representing the horizontal position (zero means the left side of the Canvas)
y
A number representing the vertical position (zero means the top side of the Canvas)
[ color ]
An optional integer that represent a RGBA color value, defaulting to the current Canvas.color
Return value
This function returns no value.Example
local ui = require "ui"
require "canvas"
-- create a simple Window
local win = ui.Window("Canvas.point() sample - Move the mouse over the window", "fixed", 500, 400)
-- create a Canvas
local canvas = ui.Canvas(win)
canvas.align = "all"
function canvas:onPaint()
canvas:point(text, xpos, ypos, math.random(0xFFFFFFFF))
end
win:show()
-- update user interface
repeat
ui.update()
until not win.visible