diff options
author | 2024-03-21 05:52:48 +0100 | |
---|---|---|
committer | 2024-03-21 05:52:48 +0100 | |
commit | 188db4da48954b95a3fe79bcd22689ffc3a661e0 (patch) | |
tree | 8af47544c98c212b50c15e66458518974139b796 /core/src/svg.rs | |
parent | 2b00e8b1457b0ccbafe12db3dbd6431c2c72f275 (diff) | |
download | iced-188db4da48954b95a3fe79bcd22689ffc3a661e0.tar.gz iced-188db4da48954b95a3fe79bcd22689ffc3a661e0.tar.bz2 iced-188db4da48954b95a3fe79bcd22689ffc3a661e0.zip |
Draft support for dynamic custom renderer injection
Diffstat (limited to 'core/src/svg.rs')
-rw-r--r-- | core/src/svg.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/core/src/svg.rs b/core/src/svg.rs index d63e3c95..ab207cca 100644 --- a/core/src/svg.rs +++ b/core/src/svg.rs @@ -91,8 +91,13 @@ impl std::fmt::Debug for Data { /// [renderer]: crate::renderer pub trait Renderer: crate::Renderer { /// Returns the default dimensions of an SVG for the given [`Handle`]. - fn dimensions(&self, handle: &Handle) -> Size<u32>; + fn measure_svg(&self, handle: &Handle) -> Size<u32>; /// Draws an SVG with the given [`Handle`], an optional [`Color`] filter, and inside the provided `bounds`. - fn draw(&mut self, handle: Handle, color: Option<Color>, bounds: Rectangle); + fn draw_svg( + &mut self, + handle: Handle, + color: Option<Color>, + bounds: Rectangle, + ); } |