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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the brightness value for a single LED. Read more

Returns the brightness value for a single LED. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Casts the value.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Casts the value.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Casts the value.

Should always be Self

Casts the value.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Casts the value.

Casts the value.