rename to image::Viewer
This commit is contained in:
parent
431171f975
commit
5d045c2e9a
9 changed files with 50 additions and 73 deletions
|
|
@ -17,5 +17,3 @@ mod svg;
|
|||
|
||||
#[cfg(feature = "image")]
|
||||
mod image;
|
||||
#[cfg(feature = "image")]
|
||||
mod image_viewer;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
mod viewer;
|
||||
|
||||
use crate::{Primitive, Renderer};
|
||||
use iced_native::{image, mouse, Layout};
|
||||
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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>;
|
||||
Loading…
Add table
Add a link
Reference in a new issue