summaryrefslogtreecommitdiffstats
path: root/graphics/src/widget/image.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-03-09 14:10:15 +0700
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-03-09 14:10:15 +0700
commit12c1a3f829c801022d45f1a294d8fc7fa10606e5 (patch)
tree05cc7a7981f13063831e7397129ea30a14a6d97a /graphics/src/widget/image.rs
parent7d9ab71790ba0395681490f3af4d3899bb09ab09 (diff)
downloadiced-12c1a3f829c801022d45f1a294d8fc7fa10606e5.tar.gz
iced-12c1a3f829c801022d45f1a294d8fc7fa10606e5.tar.bz2
iced-12c1a3f829c801022d45f1a294d8fc7fa10606e5.zip
Remove redundant `widget` modules in subcrates
Instead, we can define the type aliases just once in the root crate!
Diffstat (limited to 'graphics/src/widget/image.rs')
-rw-r--r--graphics/src/widget/image.rs25
1 files changed, 0 insertions, 25 deletions
diff --git a/graphics/src/widget/image.rs b/graphics/src/widget/image.rs
deleted file mode 100644
index 76152484..00000000
--- a/graphics/src/widget/image.rs
+++ /dev/null
@@ -1,25 +0,0 @@
-//! Display images in your user interface.
-pub mod viewer;
-
-use crate::backend::{self, Backend};
-use crate::{Primitive, Rectangle, Renderer};
-
-use iced_native::image;
-
-pub use iced_native::widget::image::{Image, Viewer};
-pub use image::Handle;
-
-impl<B> image::Renderer for Renderer<B>
-where
- B: Backend + backend::Image,
-{
- type Handle = image::Handle;
-
- fn dimensions(&self, handle: &image::Handle) -> (u32, u32) {
- self.backend().dimensions(handle)
- }
-
- fn draw(&mut self, handle: image::Handle, bounds: Rectangle) {
- self.draw_primitive(Primitive::Image { handle, bounds })
- }
-}