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

Object Safety§

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)

source§

impl Renderer for Renderer

source§

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

source§

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

Implementors§

source§

impl<A, B> Renderer for cosmic::iced_widget::renderer::fallback::Renderer<A, B>
where A: Renderer, B: Renderer,