Skip to main content

Line

path!

Draws lines.

turbo::canvas
path!(
start: (i32, i32),
end: (i32, i32),
color: u32,
width: u32,
border_radius: u32,
)
ParamTypeDefaultDescription
start(i32, i32)(0, 0)The starting point of the line
end(i32, i32)(0, 0)The end point of the line
coloru320xffffffffColor that fills the line as RGBA hex
widthu321The line width in pixels
border_radiusu320Border radius in pixels

Basic Usage

path!(
start = (0, 0),
end = (256, 144),
width = 4,
color = 0xff00ffff,
);

Path Screenshot