Skip to main content

rounded_polyline_path

Function rounded_polyline_path 

Source
pub fn rounded_polyline_path(pts: &[Position], radius: f64) -> String
Expand description

SVG path through a polyline, with each corner replaced by a quadratic turn of up to radius (clamped to half of the shorter adjoining leg, so short segments round proportionally instead of overshooting).

This is how routed subway paths are drawn: the router emits sharp waypoints and the corner rounding is purely presentational.