Struct iced_native::widget::image::viewer::Viewer[][src]

pub struct Viewer<'a> { /* fields omitted */ }

A frame that displays an image with the ability to zoom in/out and pan.

Implementations

impl<'a> Viewer<'a>[src]

pub fn new(state: &'a mut State, handle: Handle) -> Self[src]

Creates a new Viewer with the given State and Handle.

pub fn padding(self, units: u16) -> Self[src]

Sets the padding of the Viewer.

pub fn width(self, width: Length) -> Self[src]

Sets the width of the Viewer.

pub fn height(self, height: Length) -> Self[src]

Sets the height of the Viewer.

pub fn max_scale(self, max_scale: f32) -> Self[src]

Sets the max scale applied to the image of the Viewer.

Default is 10.0

pub fn min_scale(self, min_scale: f32) -> Self[src]

Sets the min scale applied to the image of the Viewer.

Default is 0.25

pub fn scale_step(self, scale_step: f32) -> Self[src]

Sets the percentage the image of the Viewer will be scaled by when zoomed in / out.

Default is 0.10

Trait Implementations

impl<'a, Message, Renderer> From<Viewer<'a>> for Element<'a, Message, Renderer> where
    Renderer: 'a + Renderer + Renderer,
    Message: 'a, 
[src]

impl<'a, Message, Renderer> Widget<Message, Renderer> for Viewer<'a> where
    Renderer: Renderer + Renderer
[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Viewer<'a>

impl<'a> Send for Viewer<'a>

impl<'a> Sync for Viewer<'a>

impl<'a> Unpin for Viewer<'a>

impl<'a> !UnwindSafe for Viewer<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,