pub fn polyline(points: &[Vec2], stroke: Stroke)Expand description
Anti-aliased polyline through caller-owned points with joins and caps.
Consecutive duplicate points are skipped. Bevel and round joins overlap the
body on the inside of a turn, so translucent strokes may darken there.
Emits at most 18 × (sections) vertices, where each point contributes one
section for miters, two for bevels and up to 17 for round joins/caps.
use ferravex_render::{Color, vec2, shapes::{self, Cap, Join, Stroke}};
let path = [vec2(10., 80.), vec2(60., 20.), vec2(110., 70.), vec2(160., 30.)];
shapes::polyline(&path, Stroke::new(4., Color::from_hex(0x5bd5d8))
.join(Join::Round).cap(Cap::Round));