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,
)
Param | Type | Default | Description |
---|---|---|---|
d | u32 | 0 | Diameter of the circle |
x | i32 | 0 | X position of the circle |
y | i32 | 0 | Y position of the circle |
color | u32 | 0xffffffff | Hex color to fill the circle with |
scale_x | f32 | 1.0 | Horizontal scaling - 1.0 is 100% (aka, no scaling) |
scale_y | f32 | 1.0 | Vertical scaling - 1.0 is 100% (aka, no scaling) |
border_width | u32 | 0 | Border width in pixels |
border_color | u32 | 0x000000 | Border color as RGBA hex |
border_radius | u32 | 0 | Border 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);