rounded_rect_path
The path of a rectangle with a radius per corner, as SVG path data. Each radius is clamped to
half the smaller side, and a radius of 0 gives a square corner (no arc is written).
Import
Section titled “Import”Cargo feature geometry (enabled by default). To compile only this module:
or in Cargo.toml:
Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
rect | Rect | The rectangle. |
radii | [f64; 4] | [top_left, top_right, bottom_right, bottom_left], as in CSS border-radius; pass [r; 4] for one radius. Negative radii count as 0. |
Returns
Section titled “Returns”String — The path data, closed.
