Closed mangelajo closed 1 year ago
Hmm, I am getting it to work by adding this to color.rs:
#[cfg(feature = "graphics")]
impl From<BinaryColor> for Color {
fn from(b: BinaryColor) -> Color {
match b {
BinaryColor::On => Color::Black,
BinaryColor::Off => Color::White,
}
}
}
and then adding .color_converted() to the display:
bus.draw(&mut display.translated(Point::new(100,100)).color_converted()).unwrap();
yes some traits are missing to work with every color
From<()>
is not implemented forepd_waveshare::color::Color
I guess it's missing some conversions?
It's defined as
I also tried creating a BinaryColor raw image, but then I cannot draw it on a "Color" display.
would it be possible to standardize into "BinaryColor" from embedded_graphics?, I could be missing lots of things, ... still new to rust.