Browse Source

fix example for epd 2.13"

* use Circle::with_center
* the large text does not fit on this screen, add newline
main
Reinier Balt 5 years ago
parent
commit
feac908558
  1. 4
      examples/epd2in13bc.rs

4
examples/epd2in13bc.rs

@ -104,7 +104,7 @@ fn main() -> Result<(), std::io::Error> {
display.clear_buffer(TriColor::White);
// draw a analog clock
let _ = Circle::new(Point::new(64, 64), 40)
let _ = Circle::with_center(Point::new(64, 64), 80)
.into_styled(PrimitiveStyle::with_stroke(TriColor::Black, 1))
.draw(&mut display);
let _ = Line::new(Point::new(64, 64), Point::new(30, 40))
@ -132,7 +132,7 @@ fn main() -> Result<(), std::io::Error> {
.background_color(TriColor::Chromatic)
.build();
let _ = Text::with_text_style("It's working-WoB!", Point::new(90, 40), style, text_style)
let _ = Text::with_text_style("It's working\nWoB!", Point::new(90, 40), style, text_style)
.draw(&mut display);
// we used three colors, so we need to update both bw-buffer and chromatic-buffer

Loading…
Cancel
Save