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

16 lines
409 B
Rust
Raw Normal View History

2019-12-06 19:37:56 +01:00
use crate::{svg::Handle, Primitive, Renderer};
2019-12-11 22:13:29 +01:00
use iced_native::{icon, MouseCursor, Rectangle};
2019-12-06 19:37:56 +01:00
use std::path::Path;
impl icon::Renderer for Renderer {
2019-12-11 22:13:29 +01:00
fn draw(&mut self, bounds: Rectangle, path: &Path) -> Self::Output {
2019-12-06 19:37:56 +01:00
(
Primitive::Svg {
handle: Handle::from_path(path),
bounds,
},
MouseCursor::OutOfBounds,
)
}
2019-12-11 22:13:29 +01:00
}