Trait microbit_text::scrolling::Scrollable[][src]

pub trait Scrollable {
    type Subimage: Render;
    fn length(&self) -> usize;
fn state(&self) -> &ScrollingState;
fn state_mut(&mut self) -> &mut ScrollingState;
fn subimage(&self, index: usize) -> &Self::Subimage; fn current_brightness_at(&self, x: usize, y: usize) -> u8 { ... } }
Expand description

A horizontally scrolling sequence of 5×5 images.

Scrollables automatically implement Animate.

When a Scrollable also implements Render, the rendered image is the current state of the animation.

Associated Types

The type of the underlying 5×5 images.

Required methods

The number of underlying images.

A ScrollingState indicating the current point in the animation.

A ScrollingState indicating the current point in the animation, as a mutable reference.

A reference to the underlying image at the specified index.

Provided methods

Returns the brightness value for a single LED in the current state.

Use this to implement Render.

Implementors