Trait iced::widget::image::viewer::Renderer[]

pub trait Renderer: Renderer {
    pub fn draw(
        &mut self,
        state: &State,
        bounds: Rectangle<f32>,
        image_size: Size<f32>,
        translation: Vector<f32>,
        handle: Handle,
        is_mouse_over: bool
    ) -> Self::Output; }
This is supported on crate feature image only.

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

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

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...

Implementations on Foreign Types

impl<B> Renderer for Renderer<B> where
    B: Backend + Image, 

Loading content...

Implementors

Loading content...