pub struct GraphicDisplay<'a, I, B = &'a mut [u8]> where
    I: DisplayInterface
{ /* private fields */ }
Expand description

A display that holds buffers for drawing into and updating the display from.

When the graphics feature is enabled GraphicDisplay implements the Draw trait from embedded-graphics. This allows basic shapes and text to be drawn on the display.

Implementations

Promote a Display to a GraphicDisplay.

B/W and Red buffers for drawing into must be supplied. These should be rows * cols in length.

Update the display by writing the buffers to the controller.

Clear the buffers, filling them a single color.

Methods from Deref<Target = Display<'a, I>>

Perform a hardware reset followed by software reset.

This will wake a controller that has previously entered deep sleep.

Update the display by writing the supplied B/W and Red buffers to the controller.

This method will write the two buffers to the controller then initiate the update display command. Currently it will busy wait until the update has completed.

Enter deep sleep mode.

This puts the display controller into a low power mode. reset must be called to wake it from sleep.

Returns the number of rows the display has.

Returns the number of columns the display has.

Returns the rotation the display was configured with.

Trait Implementations

The resulting type after dereferencing.

Dereferences the value.

Mutably dereferences the value.

The pixel color type the targetted display supports.

Error type to return when a drawing operation fails. Read more

Draw individual pixels to the display without a defined order. Read more

Fill a given area with an iterator providing a contiguous stream of pixel colors. Read more

Fill a given area with a solid color. Read more

Fill the entire display with a solid color. Read more

Returns the size of the bounding box.

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.

Casts the value.

Casts the value.

Returns the bounding box.

Creates a translated draw target based on this draw target. Read more

Creates a cropped draw target based on this draw target. Read more

Creates a clipped draw target based on this draw target. Read more

Creates a color conversion draw target. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Casts the value.

OverflowingCasts the value.

Casts the value.

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.

UnwrappedCasts the value.

Casts the value.

WrappingCasts the value.