Rename and add to iced image module
This commit is contained in:
parent
6bf459e068
commit
431171f975
7 changed files with 58 additions and 56 deletions
|
|
@ -18,4 +18,4 @@ mod svg;
|
|||
#[cfg(feature = "image")]
|
||||
mod image;
|
||||
#[cfg(feature = "image")]
|
||||
mod image_pane;
|
||||
mod image_viewer;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
use crate::{Primitive, Renderer};
|
||||
use iced_native::{image, image_pane, mouse, Rectangle, Vector};
|
||||
use iced_native::{image, image_viewer, mouse, Rectangle, Vector};
|
||||
|
||||
impl image_pane::Renderer for Renderer {
|
||||
impl image_viewer::Renderer for Renderer {
|
||||
fn draw(
|
||||
&mut self,
|
||||
state: &image_pane::State,
|
||||
state: &image_viewer::State,
|
||||
bounds: Rectangle,
|
||||
image_bounds: Rectangle,
|
||||
offset: (u32, u32),
|
||||
|
|
@ -50,8 +50,8 @@ pub use canvas::Canvas;
|
|||
|
||||
#[cfg(feature = "image")]
|
||||
#[doc(no_inline)]
|
||||
pub mod image_pane;
|
||||
pub mod image_viewer;
|
||||
|
||||
#[cfg(feature = "image")]
|
||||
#[doc(no_inline)]
|
||||
pub use image_pane::ImagePane;
|
||||
pub use image_viewer::ImageViewer;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
//! Zoom and pan on an image.
|
||||
|
||||
pub use iced_native::image_pane::State;
|
||||
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 ImagePane<'a> = iced_native::ImagePane<'a>;
|
||||
pub type ImageViewer<'a> = iced_native::ImageViewer<'a>;
|
||||
Loading…
Add table
Add a link
Reference in a new issue