From feac908558d275de01f43fc4931db869a4384f95 Mon Sep 17 00:00:00 2001 From: Reinier Balt Date: Wed, 16 Jun 2021 16:48:00 +0200 Subject: [PATCH] fix example for epd 2.13" * use Circle::with_center * the large text does not fit on this screen, add newline --- examples/epd2in13bc.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/epd2in13bc.rs b/examples/epd2in13bc.rs index 8110d79..6d8d8b8 100644 --- a/examples/epd2in13bc.rs +++ b/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