1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
use crate::{Primitive, Renderer};
use iced_native::{image, layout, Image, Layout, MouseCursor, Rectangle};
impl image::Renderer for Renderer {
fn layout(&self, image: &Image, limits: &layout::Limits) -> Layout {
// TODO
Layout::new(Rectangle {
x: 0.0,
y: 0.0,
width: 0.0,
height: 0.0,
})
}
fn draw(&mut self, image: &Image, layout: &Layout) -> Self::Output {
(
Primitive::Image {
path: image.path.clone(),
bounds: layout.bounds(),
},
MouseCursor::OutOfBounds,
)
}
}
|