Remove generic handle in Image

For now, we will simply assume images will be loaded from a given path.
This commit is contained in:
Héctor Ramón Jiménez 2019-10-22 23:20:24 +02:00
parent 523736f08b
commit f8a232c8af
4 changed files with 25 additions and 41 deletions

View file

@ -1,16 +1,12 @@
use crate::{Primitive, Renderer};
use iced_native::{image, Image, Layout, MouseCursor, Node, Style};
impl image::Renderer<&str> for Renderer {
fn node(&self, _image: &Image<&str>) -> Node {
impl image::Renderer for Renderer {
fn node(&self, _image: &Image) -> Node {
Node::new(Style::default())
}
fn draw(
&mut self,
_image: &Image<&str>,
_layout: Layout<'_>,
) -> Self::Output {
fn draw(&mut self, _image: &Image, _layout: Layout<'_>) -> Self::Output {
(Primitive::None, MouseCursor::OutOfBounds)
}
}