Trait iced_core::svg::Renderer

source ·
pub trait Renderer: Renderer {
    // Required methods
    fn measure_svg(&self, handle: &Handle) -> Size<u32>;
    fn draw_svg(
        &mut self,
        handle: Handle,
        color: Option<Color>,
        bounds: Rectangle,
        rotation: Radians,
        opacity: f32
    );
}
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, handle: Handle, color: Option<Color>, bounds: Rectangle, rotation: Radians, opacity: f32 )

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, _handle: Handle, _color: Option<Color>, _bounds: Rectangle, _rotation: Radians, _opacity: f32 )

Implementors§