Skip to main content

rounded_rect_path

Function rounded_rect_path 

Source
pub fn rounded_rect_path(
    x: f32,
    y: f32,
    w: f32,
    h: f32,
    tl: (f32, f32),
    tr: (f32, f32),
    br: (f32, f32),
    bl: (f32, f32),
) -> Path
Expand description

Builds a closed rounded rectangle path with top-left corner at (x, y).

Corner radii are given as (rx, ry) pairs in CSS order (TL, TR, BR, BL) and are clamped so opposing radii fit within the box.