Skip to main content

Circles

circ!

Draws circles.

turbo::canvas
circ!(
d: u32,
x: i32,
y: i32,
color: u32,
scale_x: f32,
scale_y: f32,
border_width: u32,
border_color: u32,
border_radius: u32,
)
ParamTypeDefaultDescription
du320Diameter of the circle
xi320X position of the circle
yi320Y position of the circle
coloru320xffffffffHex color to fill the circle with
scale_xf321.0Horizontal scaling - 1.0 is 100% (aka, no scaling)
scale_yf321.0Vertical scaling - 1.0 is 100% (aka, no scaling)
border_widthu320Border width in pixels
border_coloru320x000000Border color as RGBA hex
border_radiusu320Border radius in pixels

Basic Usage

Here's an 8px diameter magenta circle in the center of a 256x144 canvas:

circ!(d = 16, x = 120, y = 64, color = 0x000000ff);

Circle Screenshot