[][src]Trait iced_native::widget::svg::Renderer

pub trait Renderer: Renderer {
    fn dimensions(&self, handle: &Handle) -> (u32, u32);
fn draw(&mut self, handle: Handle, layout: Layout<'_>) -> Self::Output; }

The renderer of an Svg.

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

Required methods

fn dimensions(&self, handle: &Handle) -> (u32, u32)

Returns the default dimensions of an Svg for the given Handle.

fn draw(&mut self, handle: Handle, layout: Layout<'_>) -> Self::Output

Draws an Svg.

Loading content...

Implementors

Loading content...