Struct microbit::display::nonblocking::GreyscaleImage [−][src]
pub struct GreyscaleImage(_);Expand description
A 5×5 image supporting the full range of brightnesses for each LED.
Uses 25 bytes of storage.
Implementations
Constructs a GreyscaleImage from an array of brightnesses.
The data should be an array of 5 rows (top first), each of which is an array of 5 brightness values (left first).
Example
const GREY_HEART: GreyscaleImage = GreyscaleImage::new(&[
[0, 9, 0, 9, 0],
[9, 5, 9, 5, 9],
[9, 5, 5, 5, 9],
[0, 9, 5, 9, 0],
[0, 0, 9, 0, 0],
]);Construct a GreyscaleImage with all LEDs turned off.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for GreyscaleImage
impl Send for GreyscaleImage
impl Sync for GreyscaleImage
impl Unpin for GreyscaleImage
impl UnwindSafe for GreyscaleImage
Blanket Implementations
Mutably borrows from an owned value. Read more
Casts the value.
Performs the conversion.
Performs the conversion.
Casts the value.
Casts the value.
Casts the value.
Casts the value.