Move to
Jump to navigation
Jump to search
Contents
Description
_move_to(x, y)
_move_to is used to move the drawing pen to a new location.
Return value
This function won't return any value.
Arguments
# | Argument | Type | Description |
---|---|---|---|
1 | x | Number | This is the left pixel of the canvas where your pen go. |
2 | y | Number | This is the top pixel of the canvas where your pen go. |
Example
canvas_id = canvas_add(0, 0, 200, 200)
canvas_draw(canvas_id, function()
-- Queue a line from 100,100 to 200,200
_move_to(100, 100)
_line_to(200, 200)
-- Stroke the line (line width 6)
_stroke("red", 6)
end)