[−][src]Trait iced::widget::image::Renderer
The renderer of an Image
.
Your renderer will need to implement this trait before being able to use
an Image
in your user interface.
Required methods
fn node(
&self,
style: Style,
image: &I,
width: Option<u16>,
height: Option<u16>,
source: Option<Rectangle<u16>>
) -> Node
&self,
style: Style,
image: &I,
width: Option<u16>,
height: Option<u16>,
source: Option<Rectangle<u16>>
) -> Node
Creates a Node
with the given Style
for the provided Image
and its size.
You should probably keep the original aspect ratio, if possible.
fn draw(
&mut self,
image: &I,
bounds: Rectangle<f32>,
source: Option<Rectangle<u16>>
)
&mut self,
image: &I,
bounds: Rectangle<f32>,
source: Option<Rectangle<u16>>
)