iced_core::svg

Trait Renderer

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

A Renderer that can render vector graphics.

Required Methods§

Source

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

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

Source

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§

Source§

impl Renderer for ()

Source§

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

Source§

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

Implementors§