From 8db42f7ec7bcd1032624a301d7fbb03842222c25 Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 18 Oct 2018 21:39:33 +0200 Subject: [PATCH] find error --- examples/embedded_linux_epd4in2/src/main.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/examples/embedded_linux_epd4in2/src/main.rs b/examples/embedded_linux_epd4in2/src/main.rs index a1ded8f..84d3312 100644 --- a/examples/embedded_linux_epd4in2/src/main.rs +++ b/examples/embedded_linux_epd4in2/src/main.rs @@ -188,6 +188,27 @@ fn run() -> Result<(), std::io::Error> { println!("Now test new graphics:"); + println!("Now test new graphics with rotate0:"); + let mut display = DisplayEink42BlackWhite::default(); + display.set_rotation(DisplayRotation::Rotate0); + display.draw( + Font6x8::render_str("Rotate 0!") + .with_fill(Some(Color::White)) + .with_stroke(Some(Color::Black)) + .translate(Coord::new(5, 50)) + .into_iter(), + ); + display.draw( + Font6x8::render_str("Rotate 0 - inverse!") + .with_fill(Some(Color::Black)) + .with_stroke(Some(Color::White)) + .translate(Coord::new(50, 70)) + .into_iter(), + ); + epd4in2.update_frame(&mut spi, &display.buffer()).unwrap(); + epd4in2.display_frame(&mut spi).expect("display frame new graphics"); + delay.delay_ms(2000u16); + println!("Now test new graphics with rotate90:"); let mut display = DisplayEink42BlackWhite::default(); display.set_rotation(DisplayRotation::Rotate90);