pub fn fill_sector(
center: Vec2,
radius: f32,
start: f32,
sweep: f32,
fill: impl Into<Fill>,
)Expand description
Filled, anti-aliased pie slice of radius from start sweeping sweep
radians (positive is clockwise on screen with Y down), for cooldown dials,
timers and progress pies. A full turn or more fills the circle; a zero or
non-finite sweep draws nothing. Emits at most 588 vertices.
use std::f32::consts::{FRAC_PI_2, TAU};
use ferravex_render::{Color, vec2, shapes};
// Two thirds of a timer, starting at 12 o'clock.
shapes::fill_sector(vec2(40., 40.), 16., -FRAC_PI_2, TAU * 2. / 3., Color::from_hex(0xf7b553));