[−][src]Struct epd_waveshare_uart::graphics::VarDisplay
A variable Display without a predefined buffer
The buffer can be created as following: buffer: [DEFAULT_BACKGROUND_COLOR; WIDTH * HEIGHT]
Example:
let width = 296; let height = 128; let mut buffer = [DEFAULT_BACKGROUND_COLOR; 128 * 296]; let mut display = VarDisplay::new(width, height, &mut buffer); display.set_rotation(DisplayRotation::Rotate90); display.draw( Line::new(Point::new(0, 120), Point::new(0, 295)) .stroke(Some(EpdColor::Black)) .into_iter(), );
Methods
impl<'a> VarDisplay<'a>
[src]
Trait Implementations
impl<'a> Display for VarDisplay<'a>
[src]
fn buffer(&self) -> &[EpdColor]
[src]
fn get_mut_buffer(&mut self) -> &mut [EpdColor]
[src]
fn set_rotation(&mut self, rotation: DisplayRotation)
[src]
fn rotation(&self) -> DisplayRotation
[src]
fn clear_buffer(&mut self, background_color: EpdColor)
[src]
fn draw_helper<T>(&mut self, width: u32, height: u32, item_pixels: T) where
T: IntoIterator<Item = Pixel<EpdColor>>,
[src]
T: IntoIterator<Item = Pixel<EpdColor>>,
impl<'a> Drawing<EpdColor> for VarDisplay<'a>
[src]
fn draw<T>(&mut self, item_pixels: T) where
T: IntoIterator<Item = Pixel<EpdColor>>,
[src]
T: IntoIterator<Item = Pixel<EpdColor>>,
Auto Trait Implementations
impl<'a> RefUnwindSafe for VarDisplay<'a>
impl<'a> Send for VarDisplay<'a>
impl<'a> Sync for VarDisplay<'a>
impl<'a> Unpin for VarDisplay<'a>
impl<'a> !UnwindSafe for VarDisplay<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,