[][src]Trait epd_waveshare::graphics::Display

pub trait Display: DrawTarget<BinaryColor> {
    fn buffer(&self) -> &[u8];
fn get_mut_buffer(&mut self) -> &mut [u8];
fn set_rotation(&mut self, rotation: DisplayRotation);
fn rotation(&self) -> DisplayRotation; fn clear_buffer(&mut self, background_color: Color) { ... }
fn draw_helper(
        &mut self,
        width: u32,
        height: u32,
        pixel: Pixel<BinaryColor>
    ) -> Result<(), Self::Error> { ... } }

Necessary traits for all displays to implement for drawing

Adds support for:

  • Drawing (With the help of DrawTarget/Embedded Graphics)
  • Rotations
  • Clearing

Required methods

fn buffer(&self) -> &[u8]

Returns the buffer

fn get_mut_buffer(&mut self) -> &mut [u8]

Returns a mutable buffer

fn set_rotation(&mut self, rotation: DisplayRotation)

Sets the rotation of the display

fn rotation(&self) -> DisplayRotation

Get the current rotation of the display

Loading content...

Provided methods

fn clear_buffer(&mut self, background_color: Color)

Clears the buffer of the display with the chosen background color

fn draw_helper(
    &mut self,
    width: u32,
    height: u32,
    pixel: Pixel<BinaryColor>
) -> Result<(), Self::Error>

Helperfunction for the Embedded Graphics draw trait

Becomes uneccesary when const_generics become stablised

Loading content...

Implementors

impl Display for Display1in54[src]

impl Display for Display1in54b[src]

impl Display for Display2in9[src]

impl Display for Display2in9bc[src]

impl Display for Display4in2[src]

impl Display for epd_waveshare::epd7in5::Display7in5[src]

impl Display for epd_waveshare::epd7in5_v2::Display7in5[src]

impl<'a> Display for VarDisplay<'a>[src]

Loading content...