summaryrefslogblamecommitdiffstats
path: root/wgpu/src/renderer/widget/image.rs
blob: ea9d19c71931122517f145c7a6da2df4ef7de837 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
                                 
                                                                        
 
                                   







                                                                        

     
                                                                        






                                         

     
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,
        )
    }
}