Function fill_capsule

Source
pub fn fill_capsule(a: Vec2, b: Vec2, radius: f32, fill: impl Into<Fill>)
Expand description

Filled, anti-aliased capsule (a segment with round ends) of radius. Coincident end points draw a circle. Emits at most 612 vertices, or 2,592 for a subdivided Fill::Radial.

use ferravex_render::{Color, vec2, shapes};
shapes::fill_capsule(vec2(20., 20.), vec2(120., 20.), 6., Color::from_hex(0x5bd5d8));