pub struct AnalogHand {
pub kind: HandKind,
pub length: f32,
pub tail: f32,
pub width: f32,
pub color: Color,
}Expand description
Analog hand laid out as an oriented bounding box rotating around the face center. Geometry is expressed as fractions of face radius so the same hand renders correctly at any clock size.
Fields§
§kind: HandKindWhich angle this hand follows.
length: f32Length from pivot to tip, fraction of face radius.
tail: f32Length from pivot to tail end, fraction of face radius (typically
0.0..=0.25). 0.0 = no tail past the pivot.
width: f32Hand width, fraction of face radius.
color: ColorHand color (alpha modulated by AA coverage at edges).
Implementations§
Source§impl AnalogHand
impl AnalogHand
Trait Implementations§
Source§impl ClockLayer for AnalogHand
impl ClockLayer for AnalogHand
Source§fn bbox(&self, state: &ClockState, bounds: Rect) -> Rect
fn bbox(&self, state: &ClockState, bounds: Rect) -> Rect
Pixels this layer might write at
state, in absolute framebuffer
coordinates. Used for cross-layer dirty union math.Source§fn dirty(
&self,
prev: Option<&ClockState>,
state: &ClockState,
bounds: Rect,
) -> Rect
fn dirty( &self, prev: Option<&ClockState>, state: &ClockState, bounds: Rect, ) -> Rect
Self-induced dirty between
prev and state. An empty rect means
“I have not changed”; the compositor will still call paint if
another layer’s dirty rect intersects this layer’s bbox.Auto Trait Implementations§
impl Freeze for AnalogHand
impl RefUnwindSafe for AnalogHand
impl Send for AnalogHand
impl Sync for AnalogHand
impl Unpin for AnalogHand
impl UnsafeUnpin for AnalogHand
impl UnwindSafe for AnalogHand
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