diff options
author | 2021-10-14 16:07:22 +0700 | |
---|---|---|
committer | 2021-10-14 16:07:22 +0700 | |
commit | 03b34931383e701c39c653a7662a616fe21a0947 (patch) | |
tree | 8c0773d50b615dbc62210db8919ecb97ca912bd9 /graphics/src/widget/image.rs | |
parent | 3aae45c1913e6a6f60b009f19d00d10add7ad11e (diff) | |
download | iced-03b34931383e701c39c653a7662a616fe21a0947.tar.gz iced-03b34931383e701c39c653a7662a616fe21a0947.tar.bz2 iced-03b34931383e701c39c653a7662a616fe21a0947.zip |
Remove trait-specific draw logic in `iced_native`
Diffstat (limited to 'graphics/src/widget/image.rs')
-rw-r--r-- | graphics/src/widget/image.rs | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/graphics/src/widget/image.rs b/graphics/src/widget/image.rs index bdf03de3..b55ba32f 100644 --- a/graphics/src/widget/image.rs +++ b/graphics/src/widget/image.rs @@ -3,10 +3,8 @@ pub mod viewer; use crate::backend::{self, Backend}; -use crate::{Primitive, Renderer}; +use crate::Renderer; use iced_native::image; -use iced_native::mouse; -use iced_native::Layout; pub use iced_native::image::{Handle, Image, Viewer}; @@ -17,18 +15,4 @@ where fn dimensions(&self, handle: &image::Handle) -> (u32, u32) { self.backend().dimensions(handle) } - - fn draw( - &mut self, - handle: image::Handle, - layout: Layout<'_>, - ) -> Self::Output { - ( - Primitive::Image { - handle, - bounds: layout.bounds(), - }, - mouse::Interaction::default(), - ) - } } |