Skip to main content

draw_rectangle_rounded

Function draw_rectangle_rounded 

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

Draws a rounded, filled rectangle with its top-left corner at (x, y). All corners have the same radius. Use draw_rectangle_rounded_ex() to set all the radii separately.

ยงExamples

draw_rectangle_rounded(100.0, 100.0, 50.0, 80.0, 20.0, RED); // 20.0 is the radius of each corner