[−][src]Trait rmicrobit::graphics::scrolling::Scrollable
A horizontally scrolling sequence of 5×5 images.
Scrollable
s automatically implement Animate
.
When a Scrollable
also implements Render
, the rendered image is the
current state of the animation.
Associated Types
Loading content...Required methods
fn length(&self) -> usize
The number of underlying images.
fn state(&self) -> &ScrollingState
A ScrollingState
indicating the current point in the animation.
fn state_mut(&mut self) -> &mut ScrollingState
A ScrollingState
indicating the current point in the animation, as
a mutable reference.
fn subimage(&self, index: usize) -> &Self::Subimage
A reference to the underlying image at the specified index.
Provided methods
fn current_brightness_at(&self, x: usize, y: usize) -> u8
Returns the brightness value for a single LED in the current state.
Use this to implement Render
.