diff --git a/Cargo.toml b/Cargo.toml index dd14e77..59141d6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "libremarkable" -version = "0.6.2" +version = "0.7.0" authors = ["Can Selcik "] repository = "https://github.com/canselcik/libremarkable" license = "MIT" @@ -11,7 +11,6 @@ edition = "2021" [dependencies] log = "0.4.14" -env_logger = "0.10.0" once_cell = "1.9.0" atomic = "0.5.1" cgmath = "0.18.0" @@ -54,7 +53,7 @@ framebuffer-text-drawing = ["framebuffer-drawing", "rusttype"] input-types = [] input = ["scan", "input-types", "evdev", "epoll", "fxhash"] battery = [] -appctx = ["framebuffer-text-drawing", "image", "input", "aabb-quadtree"] +appctx = ["framebuffer-text-drawing", "input", "aabb-quadtree"] enable-runtime-benchmarking = ["stopwatch"] @@ -82,6 +81,7 @@ path = "examples/live.rs" crate-type = ["bin"] [dev-dependencies] +env_logger = "0.10.0" # For spy redhook = "2.0.0" libc = "0.2.69" diff --git a/src/appctx.rs b/src/appctx.rs index a479f9f..a695b3b 100644 --- a/src/appctx.rs +++ b/src/appctx.rs @@ -230,6 +230,7 @@ impl<'a> ApplicationContext<'a> { draw_area } + #[cfg(feature = "image")] pub fn display_image( &mut self, img: &image::DynamicImage, diff --git a/src/ui_extensions/element.rs b/src/ui_extensions/element.rs index 11e5fc2..c324ec5 100644 --- a/src/ui_extensions/element.rs +++ b/src/ui_extensions/element.rs @@ -79,9 +79,8 @@ pub enum UIElement { foreground: color, border_px: u32, }, - Image { - img: image::DynamicImage, - }, + #[cfg(feature = "image")] + Image { img: image::DynamicImage }, Region { size: cgmath::Vector2, border_color: color, @@ -158,6 +157,7 @@ impl UIElementWrapper { text, refresh, ), + #[cfg(feature = "image")] UIElement::Image { ref img } => { app.display_image(img, self.position.cast().unwrap(), refresh) }