use tessera_ui::{Color, DrawCommand};
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum ProgressArcCap {
Round,
Butt,
}
#[derive(Debug, Clone, Copy, PartialEq)]
pub struct ProgressArcCommand {
pub color: Color,
pub stroke_width_px: f32,
pub start_angle_degrees: f32,
pub sweep_angle_degrees: f32,
pub cap: ProgressArcCap,
}
impl DrawCommand for ProgressArcCommand {
fn apply_opacity(&mut self, opacity: f32) {
self.color = self
.color
.with_alpha(self.color.a * opacity.clamp(0.0, 1.0));
}
}