Trait iced::advanced::svg::Renderer

source ·
pub trait Renderer: Renderer {
    // Required methods
    fn dimensions(&self, handle: &Handle) -> Size<u32>;
    fn draw(&mut self, handle: Handle, color: Option<Color>, bounds: Rectangle);
}
Available on crate feature advanced only.
Expand description

A Renderer that can render vector graphics.

Required Methods§

source

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

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

source

fn draw(&mut self, handle: Handle, color: Option<Color>, 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§

§

impl<B> Renderer for Renderer<B>
where B: Backend + Svg,

§

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

§

fn draw(&mut self, handle: Handle, color: Option<Color>, bounds: Rectangle)

Implementors§

source§

impl Renderer for iced::Renderer

Available on crate feature svg only.