diff options
Diffstat (limited to 'native/src/image.rs')
-rw-r--r-- | native/src/image.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/native/src/image.rs b/native/src/image.rs index 00379417..43bba4f1 100644 --- a/native/src/image.rs +++ b/native/src/image.rs @@ -115,10 +115,15 @@ impl std::fmt::Debug for Data { /// /// [renderer]: crate::renderer pub trait Renderer: crate::Renderer { + /// The image Handle to be displayed. Iced exposes its own default implementation of a [`Handle`] + /// + /// [`Handle`]: Self::Handle + type Handle: Clone + Hash; + /// Returns the dimensions of an image for the given [`Handle`]. - fn dimensions(&self, handle: &Handle) -> (u32, u32); + fn dimensions(&self, handle: &Self::Handle) -> (u32, u32); /// Draws an image with the given [`Handle`] and inside the provided /// `bounds`. - fn draw(&mut self, handle: Handle, bounds: Rectangle); + fn draw(&mut self, handle: Self::Handle, bounds: Rectangle); } |