Skip to main content

SubsecondDot

Struct SubsecondDot 

Source
pub struct SubsecondDot {
    pub orbit_radius: f32,
    pub dot_radius: f32,
    pub color: Color,
}
Expand description

Sub-second indicator: a small disc orbiting the face center at the sub-second fractional rate. Completes one full orbit per wall-clock second, giving visible per-frame motion at 30 Hz / 60 Hz tick rates — useful for confirming the driver is delivering target times to the widget on time, and for visualising end-to-end render pipeline latency.

Fields§

§orbit_radius: f32

Orbit radius as a fraction of face radius (typical 0.4..=0.7).

§dot_radius: f32

Dot radius as a fraction of face radius (typical 0.015..=0.04).

§color: Color

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

Implementations§

Source§

impl SubsecondDot

Source

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

Default dot at 65% orbit radius, 2% dot radius.

Trait Implementations§

Source§

impl ClockLayer for SubsecondDot

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.