Skip to content

Commit

Permalink
Update to e-g beta.1 (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
rfuest authored Apr 24, 2021
1 parent b25ad1a commit 116ce66
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
5 changes: 1 addition & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ version = "0.32.2"
optional = true

[dependencies.embedded-graphics]
version = "0.7.0-alpha.3"

[dev-dependencies]
chrono = "0.4.10"
version = "0.7.0-beta.1"

[features]
default = [ "with-sdl" ]
Expand Down
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,16 @@ use embedded_graphics::{
pixelcolor::BinaryColor,
prelude::*,
primitives::{Circle, Line, Rectangle, PrimitiveStyle},
mono_font::{ascii::Font6x9, MonoTextStyle},
mono_font::{ascii::FONT_6X9, MonoTextStyle},
text::Text,
};
use embedded_graphics_simulator::{BinaryColorTheme, SimulatorDisplay, Window, OutputSettingsBuilder};

fn main() -> Result<(), core::convert::Infallible> {
let mut display: SimulatorDisplay<BinaryColor> = SimulatorDisplay::new(Size::new(128, 64));
let mut display = SimulatorDisplay::<BinaryColor>::new(Size::new(128, 64));

let line_style = PrimitiveStyle::with_stroke(BinaryColor::On, 1);
let text_style = MonoTextStyle::new(&FONT_6X9, BinaryColor::On);

Circle::new(Point::new(72, 8), 48)
.into_styled(line_style)
Expand All @@ -50,9 +51,7 @@ fn main() -> Result<(), core::convert::Infallible> {
.into_styled(line_style)
.draw(&mut display)?;

Text::new("Hello World!", Point::new(5, 5))
.into_styled(MonoTextStyle::new(Font6x9, BinaryColor::On))
.draw(&mut display)?;
Text::new("Hello World!", Point::new(5, 5), text_style).draw(&mut display)?;

let output_settings = OutputSettingsBuilder::new()
.theme(BinaryColorTheme::OledBlue)
Expand Down
9 changes: 4 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,16 @@
//! pixelcolor::BinaryColor,
//! prelude::*,
//! primitives::{Circle, Line, Rectangle, PrimitiveStyle},
//! mono_font::{ascii::Font6x9, MonoTextStyle},
//! mono_font::{ascii::FONT_6X9, MonoTextStyle},
//! text::Text,
//! };
//! use embedded_graphics_simulator::{BinaryColorTheme, SimulatorDisplay, Window, OutputSettingsBuilder};
//!
//! fn main() -> Result<(), core::convert::Infallible> {
//! let mut display: SimulatorDisplay<BinaryColor> = SimulatorDisplay::new(Size::new(128, 64));
//! let mut display = SimulatorDisplay::<BinaryColor>::new(Size::new(128, 64));
//!
//! let line_style = PrimitiveStyle::with_stroke(BinaryColor::On, 1);
//! let text_style = MonoTextStyle::new(&FONT_6X9, BinaryColor::On);
//!
//! Circle::new(Point::new(72, 8), 48)
//! .into_styled(line_style)
Expand All @@ -41,9 +42,7 @@
//! .into_styled(line_style)
//! .draw(&mut display)?;
//!
//! Text::new("Hello World!", Point::new(5, 5))
//! .into_styled(MonoTextStyle::new(Font6x9, BinaryColor::On))
//! .draw(&mut display)?;
//! Text::new("Hello World!", Point::new(5, 5), text_style).draw(&mut display)?;
//!
//! let output_settings = OutputSettingsBuilder::new()
//! .theme(BinaryColorTheme::OledBlue)
Expand Down

0 comments on commit 116ce66

Please sign in to comment.