[][src]Struct iced::widget::image::Image

pub struct Image<I> { /* fields omitted */ }

A frame that displays an image while keeping aspect ratio.

It implements Widget when the associated Renderer implements the image::Renderer trait.

Example

use iced::Image;

let image = Image::new(my_handle);

Methods

impl<I> Image<I>[src]

pub fn new(image: I) -> Self[src]

Creates a new Image with given image handle.

pub fn clip(self, source: Rectangle<u16>) -> Self[src]

Sets the portion of the Image to draw.

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

Sets the width of the Image boundaries in pixels.

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

Sets the height of the Image boundaries in pixels.

pub fn align_self(self, align: Align) -> Self[src]

Sets the alignment of the Image itself.

This is useful if you want to override the default alignment given by the parent container.

Trait Implementations

impl<I, Message, Renderer> Widget<Message, Renderer> for Image<I> where
    Renderer: Renderer<I>,
    I: Clone
[src]

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

impl<I> Debug for Image<I>[src]

Auto Trait Implementations

impl<I> Sync for Image<I> where
    I: Sync

impl<I> Send for Image<I> where
    I: Send

impl<I> Unpin for Image<I> where
    I: Unpin

impl<I> UnwindSafe for Image<I> where
    I: UnwindSafe

impl<I> RefUnwindSafe for Image<I> where
    I: RefUnwindSafe

Blanket Implementations

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

impl<T> From<T> for 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<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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

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