Draft new iced_graphics crate 🎉
This commit is contained in:
parent
d4743183d4
commit
05af8d00d4
100 changed files with 861 additions and 1755 deletions
|
|
@ -1,22 +0,0 @@
|
|||
use crate::{Primitive, Renderer};
|
||||
use iced_native::{image, mouse, Layout};
|
||||
|
||||
impl image::Renderer for Renderer {
|
||||
fn dimensions(&self, handle: &image::Handle) -> (u32, u32) {
|
||||
self.image_pipeline.dimensions(handle)
|
||||
}
|
||||
|
||||
fn draw(
|
||||
&mut self,
|
||||
handle: image::Handle,
|
||||
layout: Layout<'_>,
|
||||
) -> Self::Output {
|
||||
(
|
||||
Primitive::Image {
|
||||
handle,
|
||||
bounds: layout.bounds(),
|
||||
},
|
||||
mouse::Interaction::default(),
|
||||
)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue