rename to image::Viewer

This commit is contained in:
Cory Forsstrom 2020-05-26 17:15:55 -07:00
parent 431171f975
commit 5d045c2e9a
No known key found for this signature in database
GPG key ID: 64D6B5851FFCAC9E
9 changed files with 50 additions and 73 deletions

View file

@ -17,5 +17,3 @@ mod svg;
#[cfg(feature = "image")]
mod image;
#[cfg(feature = "image")]
mod image_viewer;

View file

@ -1,3 +1,5 @@
mod viewer;
use crate::{Primitive, Renderer};
use iced_native::{image, mouse, Layout};

View file

@ -1,10 +1,10 @@
use crate::{Primitive, Renderer};
use iced_native::{image, image_viewer, mouse, Rectangle, Vector};
use iced_native::{image, mouse, Rectangle, Vector};
impl image_viewer::Renderer for Renderer {
impl image::viewer::Renderer for Renderer {
fn draw(
&mut self,
state: &image_viewer::State,
state: &image::State,
bounds: Rectangle,
image_bounds: Rectangle,
offset: (u32, u32),

View file

@ -47,11 +47,3 @@ pub mod canvas;
#[cfg(feature = "canvas")]
#[doc(no_inline)]
pub use canvas::Canvas;
#[cfg(feature = "image")]
#[doc(no_inline)]
pub mod image_viewer;
#[cfg(feature = "image")]
#[doc(no_inline)]
pub use image_viewer::ImageViewer;

View file

@ -1,6 +0,0 @@
//! Zoom and pan on an image.
pub use iced_native::image_viewer::State;
/// A widget that can display an image with the ability to zoom in/out and pan.
pub type ImageViewer<'a> = iced_native::ImageViewer<'a>;