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:
dbr
2019-08-17 09:31:58 +09:30
parent 99b4cff362
commit 3e56353cb6
12 changed files with 79 additions and 79 deletions
+4 -4
View File
@@ -78,7 +78,7 @@ mod tests {
let mut display = Display1in54::default();
display.draw(
Line::new(Coord::new(0, 0), Coord::new(7, 0))
.with_stroke(Some(Color::Black))
.stroke(Some(Color::Black))
.into_iter(),
);
@@ -97,7 +97,7 @@ mod tests {
display.set_rotation(DisplayRotation::Rotate90);
display.draw(
Line::new(Coord::new(0, 192), Coord::new(0, 199))
.with_stroke(Some(Color::Black))
.stroke(Some(Color::Black))
.into_iter(),
);
@@ -116,7 +116,7 @@ mod tests {
display.set_rotation(DisplayRotation::Rotate180);
display.draw(
Line::new(Coord::new(192, 199), Coord::new(199, 199))
.with_stroke(Some(Color::Black))
.stroke(Some(Color::Black))
.into_iter(),
);
@@ -138,7 +138,7 @@ mod tests {
display.set_rotation(DisplayRotation::Rotate270);
display.draw(
Line::new(Coord::new(199, 0), Coord::new(199, 7))
.with_stroke(Some(Color::Black))
.stroke(Some(Color::Black))
.into_iter(),
);
+2 -2
View File
@@ -19,8 +19,8 @@
//! // Write some hello world in the screenbuffer
//! display.draw(
//! Font6x8::render_str("Hello World!")
//! .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(),
//! );
+2 -2
View File
@@ -21,8 +21,8 @@
//! // Write some hello world in the screenbuffer
//! display.draw(
//! Font6x8::render_str("Hello World!")
//! .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(),
//! );
+4 -4
View File
@@ -79,7 +79,7 @@ mod tests {
let mut display = Display4in2::default();
display.draw(
Line::new(Coord::new(0, 0), Coord::new(7, 0))
.with_stroke(Some(Color::Black))
.stroke(Some(Color::Black))
.into_iter(),
);
@@ -98,7 +98,7 @@ mod tests {
display.set_rotation(DisplayRotation::Rotate90);
display.draw(
Line::new(Coord::new(0, 392), Coord::new(0, 399))
.with_stroke(Some(Color::Black))
.stroke(Some(Color::Black))
.into_iter(),
);
@@ -117,7 +117,7 @@ mod tests {
display.set_rotation(DisplayRotation::Rotate180);
display.draw(
Line::new(Coord::new(392, 299), Coord::new(399, 299))
.with_stroke(Some(Color::Black))
.stroke(Some(Color::Black))
.into_iter(),
);
@@ -139,7 +139,7 @@ mod tests {
display.set_rotation(DisplayRotation::Rotate270);
display.draw(
Line::new(Coord::new(299, 0), Coord::new(299, 7))
.with_stroke(Some(Color::Black))
.stroke(Some(Color::Black))
.into_iter(),
);
+3 -3
View File
@@ -95,7 +95,7 @@ pub trait Display: Drawing<Color> {
///
/// display.draw(
/// Line::new(Coord::new(0, 120), Coord::new(0, 295))
/// .with_stroke(Some(Color::Black))
/// .stroke(Some(Color::Black))
/// .into_iter(),
/// );
/// ```
@@ -249,7 +249,7 @@ mod tests {
display.draw(
Line::new(Coord::new(0, 0), Coord::new(7, 0))
.with_stroke(Some(Color::Black))
.stroke(Some(Color::Black))
.into_iter(),
);
@@ -275,7 +275,7 @@ mod tests {
display.draw(
Line::new(Coord::new(0, 120), Coord::new(0, 295))
.with_stroke(Some(Color::Black))
.stroke(Some(Color::Black))
.into_iter(),
);
+2 -2
View File
@@ -37,8 +37,8 @@
//! // Write some hello world in the screenbuffer
//! display.draw(
//! Font6x8::render_str("Hello World!")
//! .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(),
//! );