Skip to content

Lines

Path Screenshot

Overview

You can draw lines to your game's canvas using the path! macro.

API

path!

Draws lines.

path!(
    start = (i32, i32),
    end = (i32, i32),
    size = u32,
    color = u32,
    rounded = bool,
)
ParamTypeDefaultDescription
start(i32, i32)(0, 0)The starting point of the line
end(i32, i32)(0, 0)The end point of the line
sizeu321The line width in pixels
coloru320xffffffffColor that fills the line as RGBA hex
roundedboolfalseStylize the line to be square or round