From e89c51cb84176a495ffe3b7e30474e675f55fc51 Mon Sep 17 00:00:00 2001 From: Mitch Souders Date: Tue, 24 Aug 2021 10:37:47 -0700 Subject: [PATCH] Switch to embedded graphics core --- src/color.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/color.rs b/src/color.rs index 909bb10..ed99ff5 100644 --- a/src/color.rs +++ b/src/color.rs @@ -1,9 +1,9 @@ //! B/W Color for EPDs #[cfg(feature = "graphics")] -use embedded_graphics::pixelcolor::BinaryColor; +use embedded_graphics_core::pixelcolor::BinaryColor; #[cfg(feature = "graphics")] -use embedded_graphics::pixelcolor::PixelColor; +use embedded_graphics_core::pixelcolor::PixelColor; #[cfg(feature = "graphics")] pub use BinaryColor::Off as White; @@ -83,7 +83,7 @@ impl From for OctColor { } #[cfg(feature = "graphics")] -impl From for embedded_graphics::pixelcolor::Rgb888 { +impl From for embedded_graphics_core::pixelcolor::Rgb888 { fn from(b: OctColor) -> Self { let (r, b, g) = b.rgb(); Self::new(r, b, g) @@ -91,9 +91,9 @@ impl From for embedded_graphics::pixelcolor::Rgb888 { } #[cfg(feature = "graphics")] -impl From for OctColor { - fn from(p: embedded_graphics::pixelcolor::Rgb888) -> OctColor { - use embedded_graphics::prelude::RgbColor; +impl From for OctColor { + fn from(p: embedded_graphics_core::pixelcolor::Rgb888) -> OctColor { + use embedded_graphics_core::prelude::RgbColor; let colors = [ OctColor::Black, OctColor::White, @@ -126,16 +126,16 @@ impl From for OctColor { } #[cfg(feature = "graphics")] -impl From for OctColor { - fn from(b: embedded_graphics::pixelcolor::raw::RawU4) -> Self { - use embedded_graphics::prelude::RawData; +impl From for OctColor { + fn from(b: embedded_graphics_core::pixelcolor::raw::RawU4) -> Self { + use embedded_graphics_core::prelude::RawData; OctColor::from_nibble(b.into_inner()).unwrap() } } #[cfg(feature = "graphics")] impl PixelColor for OctColor { - type Raw = embedded_graphics::pixelcolor::raw::RawU4; + type Raw = embedded_graphics_core::pixelcolor::raw::RawU4; } impl OctColor {