[−][src]Trait epd_waveshare::graphics::Display
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
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>
&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