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
impl 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more