Expand description
A smartwatch watchface implementation
This crate provides the Watchface struct which can contain watchface data. Then it provides
the SimpleWatchfaceStyle for drawing this data to a embedded_graphics::DrawTarget.
§Current state
The current version of this crate is only able to draw the time and the style is ugly.
§Examples
use chrono::Local;
use embedded_graphics::Drawable;
use embedded_graphics::mock_display::MockDisplay;
use embedded_graphics::pixelcolor::Rgb888;
use watchface::SimpleWatchfaceStyle;
use watchface::Watchface;
let style = SimpleWatchfaceStyle::default();
let styled_watchface = Watchface::build()
.with_time(Local::now())
.into_styled(style);
let mut display = MockDisplay::<Rgb888>::new();
display.set_allow_out_of_bounds_drawing(true); //MockDisplay is too small for SimpleWatchfaceStyle
display.set_allow_overdraw(true);
styled_watchface.draw(&mut display);§Simulator
A simulator is available for testing a watchface on a desktop. Run the example using:
cargo run --example simulatorModules§
Structs§
- Simple
Watchface Style - Simple watchface style
- Textual
Time Watchface Style - Watchface
- Representation of watchface data
- Watchface
Builder - Builder for creating watchface data