iced/wgpu/src/renderer/widget/icon.rs
2019-12-11 22:13:29 +01:00

15 lines
409 B
Rust

use crate::{svg::Handle, Primitive, Renderer};
use iced_native::{icon, MouseCursor, Rectangle};
use std::path::Path;
impl icon::Renderer for Renderer {
fn draw(&mut self, bounds: Rectangle, path: &Path) -> Self::Output {
(
Primitive::Svg {
handle: Handle::from_path(path),
bounds,
},
MouseCursor::OutOfBounds,
)
}
}