iced::advanced::svg

Trait Renderer

pub trait Renderer: Renderer {
    // Required methods
    fn measure_svg(&self, handle: &Handle) -> Size<u32>;
    fn draw_svg(&mut self, svg: Svg, bounds: Rectangle);
}
Available on crate feature advanced only.
Expand description

A Renderer that can render vector graphics.

Required Methods§

fn measure_svg(&self, handle: &Handle) -> Size<u32>

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

fn draw_svg(&mut self, svg: Svg, bounds: Rectangle)

Draws an SVG with the given Handle, an optional Color filter, and inside the provided bounds.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

§

impl Renderer for ()

§

fn measure_svg(&self, _handle: &Handle) -> Size<u32>

§

fn draw_svg(&mut self, _svg: Svg, _bounds: Rectangle)

Source§

impl Renderer for Renderer

Available on crate feature svg only.
Source§

fn measure_svg(&self, handle: &Handle) -> Size<u32>

Source§

fn draw_svg(&mut self, svg: Svg, bounds: Rectangle)

Source§

impl Renderer for Renderer

Available on crate feature svg only.
Source§

fn measure_svg(&self, handle: &Handle) -> Size<u32>

Source§

fn draw_svg(&mut self, svg: Svg, bounds: Rectangle)

Source§

impl<A, B> Renderer for Renderer<A, B>
where A: Renderer, B: Renderer,

Source§

fn measure_svg(&self, handle: &Handle) -> Size<u32>

Source§

fn draw_svg(&mut self, svg: Svg, bounds: Rectangle)

Implementors§