Draft support for dynamic custom renderer injection

This commit is contained in:
Héctor Ramón Jiménez 2024-03-21 05:52:48 +01:00
parent 2b00e8b145
commit 188db4da48
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
12 changed files with 316 additions and 35 deletions

View file

@ -186,11 +186,11 @@ pub trait Renderer: crate::Renderer {
type Handle: Clone + Hash;
/// Returns the dimensions of an image for the given [`Handle`].
fn dimensions(&self, handle: &Self::Handle) -> Size<u32>;
fn measure_image(&self, handle: &Self::Handle) -> Size<u32>;
/// Draws an image with the given [`Handle`] and inside the provided
/// `bounds`.
fn draw(
fn draw_image(
&mut self,
handle: Self::Handle,
filter_method: FilterMethod,