iced-yoda/wgpu/src/renderer/widget/icon.rs

21 lines
446 B
Rust
Raw Normal View History

2019-12-06 19:37:56 +01:00
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,
)
}
}