pub enum IndicatorSegment {
Arc {
start: f32,
sweep: f32,
alpha: f32,
},
Dot {
angle: f32,
radius: f32,
alpha: f32,
},
}Expand description
One piece of the indicator, ready to draw.
A segment shorter than its own stroke cannot be drawn as an arc without looking like a blob, so Wear swaps it for a circle that shrinks and fades out together. Callers draw whichever variant they are handed.
Variants§
Arc
A stroked arc with a round cap, already inset so the caps land on the
nominal bounds. start and sweep are radians, 0 at 3 o’clock.
Dot
A filled circle standing in for an arc too short to draw.
Trait Implementations§
Source§impl Clone for IndicatorSegment
impl Clone for IndicatorSegment
Source§fn clone(&self) -> IndicatorSegment
fn clone(&self) -> IndicatorSegment
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for IndicatorSegment
Source§impl Debug for IndicatorSegment
impl Debug for IndicatorSegment
Source§impl PartialEq for IndicatorSegment
impl PartialEq for IndicatorSegment
impl StructuralPartialEq for IndicatorSegment
Auto Trait Implementations§
impl Freeze for IndicatorSegment
impl RefUnwindSafe for IndicatorSegment
impl Send for IndicatorSegment
impl Sync for IndicatorSegment
impl Unpin for IndicatorSegment
impl UnsafeUnpin for IndicatorSegment
impl UnwindSafe for IndicatorSegment
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more