Skip to main content

rounded_rectangle

Function rounded_rectangle 

Source
pub fn rounded_rectangle(
    width: f64,
    height: f64,
    radius: f64,
    segments_per_corner: usize,
) -> Vec<Point2>
Expand description

Generate a rounded rectangle polygon.

width, height are the full dimensions, radius is corner radius. The rectangle is centred at the origin.