Browse Source

Make lines visible

embedded-hal-1.0
Chris 7 years ago
parent
commit
533cb84123
  1. 10
      examples/embedded_linux_epd4in2/src/main.rs

10
examples/embedded_linux_epd4in2/src/main.rs

@ -193,29 +193,29 @@ fn run() -> Result<(), std::io::Error> {
let mut display = DisplayEink42BlackWhite::default(); let mut display = DisplayEink42BlackWhite::default();
display.draw( display.draw(
Circle::new(Coord::new(64, 64), 64) Circle::new(Coord::new(64, 64), 64)
.with_stroke(Some(1u8.into())) .with_stroke(Color::Black))
.into_iter(), .into_iter(),
); );
display.draw( display.draw(
Line::new(Coord::new(64, 64), Coord::new(0, 64)) Line::new(Coord::new(64, 64), Coord::new(0, 64))
.with_stroke(Some(1u8.into())) .with_stroke(Color::Black))
.into_iter(), .into_iter(),
); );
display.draw( display.draw(
Line::new(Coord::new(64, 64), Coord::new(80, 80)) Line::new(Coord::new(64, 64), Coord::new(80, 80))
.with_stroke(Some(1u8.into())) .with_stroke(Color::Black))
.into_iter(), .into_iter(),
); );
display.draw( display.draw(
Font6x8::render_str("Hello World!") Font6x8::render_str("Hello World!")
.with_stroke(Some(1u8.into())) .with_stroke(Some(1u8.into()))
.translate(Coord::new(5 + i, 50)) .translate(Coord::new(5 + i*5, 50))
.into_iter(), .into_iter(),
); );
epd4in2.update_frame(&mut spi, &display.get_buffer()).unwrap(); epd4in2.update_frame(&mut spi, &display.get_buffer()).unwrap();
epd4in2.display_frame(&mut spi).expect("display frame new graphics"); epd4in2.display_frame(&mut spi).expect("display frame new graphics");
if i > 296 { if i > 60 {
break; break;
} }

Loading…
Cancel
Save