Skip to main content

draw_rectangle_lines_rounded

Function draw_rectangle_lines_rounded 

Source
pub fn draw_rectangle_lines_rounded(
    x: f32,
    y: f32,
    w: f32,
    h: f32,
    radius: f32,
    thickness: f32,
    color: Color,
)
Expand description

Draws the outline of a rounded rectangle with its top-left corner at (x, y). All corners have the same radius. The stroke is centered on the rectangle’s edge. Use draw_rectangle_lines_rounded_ex() to set each corner’s radius separately.

§Examples

draw_rectangle_lines_rounded(100.0, 100.0, 50.0, 80.0, 12.0, 3.0, WHITE);
// radius = 12.0, thickness = 3.0