blob: 0006dde1d6beda5cb66749b97932c0d44240d5a1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
use crate::{Primitive, Renderer};
use iced_native::{image, Layout, MouseCursor};
impl image::Renderer for Renderer {
fn dimensions(&self, path: &str) -> (u32, u32) {
self.image_pipeline.dimensions(path)
}
fn draw(&mut self, path: &str, layout: Layout<'_>) -> Self::Output {
(
Primitive::Image {
path: String::from(path),
bounds: layout.bounds(),
},
MouseCursor::OutOfBounds,
)
}
}
|