Trait iced_native::widget::image::viewer::Renderer[][src]

pub trait Renderer: Renderer + Sized {
    fn draw(
        &mut self,
        state: &State,
        bounds: Rectangle,
        image_size: Size,
        translation: Vector,
        handle: Handle,
        is_mouse_over: bool
    ) -> Self::Output; }

The renderer of an Viewer.

Your renderer will need to implement this trait before being able to use a Viewer in your user interface.

Required methods

fn draw(
    &mut self,
    state: &State,
    bounds: Rectangle,
    image_size: Size,
    translation: Vector,
    handle: Handle,
    is_mouse_over: bool
) -> Self::Output
[src]

Draws the Viewer.

It receives:

  • the State of the Viewer
  • the bounds of the Viewer widget
  • the Size of the scaled Viewer image
  • the translation of the clipped image
  • the Handle to the underlying image
  • whether the mouse is over the Viewer or not
Loading content...

Implementors

Loading content...