mirror of
https://github.com/Anshorei/epd-waveshare.git
synced 2026-10-03 22:06:43 +00:00
fix example for epd 2.13"
* use Circle::with_center * the large text does not fit on this screen, add newline
This commit is contained in:
@@ -104,7 +104,7 @@ fn main() -> Result<(), std::io::Error> {
|
|||||||
display.clear_buffer(TriColor::White);
|
display.clear_buffer(TriColor::White);
|
||||||
|
|
||||||
// draw a analog clock
|
// 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))
|
.into_styled(PrimitiveStyle::with_stroke(TriColor::Black, 1))
|
||||||
.draw(&mut display);
|
.draw(&mut display);
|
||||||
let _ = Line::new(Point::new(64, 64), Point::new(30, 40))
|
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)
|
.background_color(TriColor::Chromatic)
|
||||||
.build();
|
.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);
|
.draw(&mut display);
|
||||||
|
|
||||||
// we used three colors, so we need to update both bw-buffer and chromatic-buffer
|
// we used three colors, so we need to update both bw-buffer and chromatic-buffer
|
||||||
|
|||||||
Reference in New Issue
Block a user