Fixed Readme Example
parent
3871c1672e
commit
5ba408d5a7
12
README.md
12
README.md
|
|
@ -22,11 +22,13 @@ let mut display = Display::new(epd.width(), epd.height(), &mut buffer.buffer);
|
||||||
|
|
||||||
// Draw some text
|
// Draw some text
|
||||||
display.draw(
|
display.draw(
|
||||||
Font12x16::render_str("Hello Rust!")
|
let _ = Text::new("Hello Rust!", Point::new(x, y))
|
||||||
.stroke(Some(Color::Black))
|
.into_styled(text_style!(
|
||||||
.fill(Some(Color::White))
|
font = Font12x16,
|
||||||
.translate(Point::new(5, 50))
|
text_color = Black,
|
||||||
.into_iter(),
|
background_color = White
|
||||||
|
))
|
||||||
|
.draw(display);
|
||||||
);
|
);
|
||||||
|
|
||||||
// Transfer the frame data to the epd
|
// Transfer the frame data to the epd
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue