mirror of
https://github.com/Anshorei/epd-waveshare.git
synced 2026-10-03 22:06:43 +00:00
embedded-graphics 0.5.0 removed the with_ prefix from some methods
with_stroke() to stroke() with_fill() to fill() with_style() to style()
This commit is contained in:
@@ -80,8 +80,8 @@ fn run() -> Result<(), std::io::Error> {
|
||||
display.set_rotation(DisplayRotation::Rotate0);
|
||||
display.draw(
|
||||
Font6x8::render_str("Rotate 0!")
|
||||
.with_stroke(Some(Color::Black))
|
||||
.with_fill(Some(Color::White))
|
||||
.stroke(Some(Color::Black))
|
||||
.fill(Some(Color::White))
|
||||
.translate(Coord::new(5, 50))
|
||||
.into_iter(),
|
||||
);
|
||||
@@ -89,8 +89,8 @@ fn run() -> Result<(), std::io::Error> {
|
||||
display.set_rotation(DisplayRotation::Rotate90);
|
||||
display.draw(
|
||||
Font6x8::render_str("Rotate 90!")
|
||||
.with_stroke(Some(Color::Black))
|
||||
.with_fill(Some(Color::White))
|
||||
.stroke(Some(Color::Black))
|
||||
.fill(Some(Color::White))
|
||||
.translate(Coord::new(5, 50))
|
||||
.into_iter(),
|
||||
);
|
||||
@@ -98,8 +98,8 @@ fn run() -> Result<(), std::io::Error> {
|
||||
display.set_rotation(DisplayRotation::Rotate180);
|
||||
display.draw(
|
||||
Font6x8::render_str("Rotate 180!")
|
||||
.with_stroke(Some(Color::Black))
|
||||
.with_fill(Some(Color::White))
|
||||
.stroke(Some(Color::Black))
|
||||
.fill(Some(Color::White))
|
||||
.translate(Coord::new(5, 50))
|
||||
.into_iter(),
|
||||
);
|
||||
@@ -107,8 +107,8 @@ fn run() -> Result<(), std::io::Error> {
|
||||
display.set_rotation(DisplayRotation::Rotate270);
|
||||
display.draw(
|
||||
Font6x8::render_str("Rotate 270!")
|
||||
.with_stroke(Some(Color::Black))
|
||||
.with_fill(Some(Color::White))
|
||||
.stroke(Some(Color::Black))
|
||||
.fill(Some(Color::White))
|
||||
.translate(Coord::new(5, 50))
|
||||
.into_iter(),
|
||||
);
|
||||
@@ -129,7 +129,7 @@ fn run() -> Result<(), std::io::Error> {
|
||||
|
||||
display.draw(
|
||||
Font6x8::render_str(" Hello World! ")
|
||||
.with_style(Style {
|
||||
.style(Style {
|
||||
fill_color: Some(Color::White),
|
||||
stroke_color: Some(Color::Black),
|
||||
stroke_width: 0u8, // Has no effect on fonts
|
||||
|
||||
Reference in New Issue
Block a user