Skip to main content

CenterCap

Struct CenterCap 

Source
pub struct CenterCap {
    pub radius: f32,
    pub color: Color,
}
Expand description

Filled circular cap at the face center, drawn on top of the hands to hide the small visual gap where the three hand pivots meet. Static after first paint; the same union-expansion pass that protects tick marks ensures pristine restore covers the cap before any blend.

Fields§

§radius: f32

Cap radius as a fraction of face radius (typical 0.03..=0.06).

§color: Color

Cap color (alpha modulated by AA coverage at edges).

Implementations§

Source§

impl CenterCap

Source

pub const fn standard(color: Color) -> Self

Default cap sized to comfortably cover the typical pivot region.

Trait Implementations§

Source§

impl ClockLayer for CenterCap

Source§

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

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.
Source§

fn paint(&self, renderer: &mut dyn Renderer, _state: &ClockState, bounds: Rect)

Paint this layer at state. Layers must paint within their declared bbox — the compositor relies on that for dirty-rect correctness.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.