summaryrefslogtreecommitdiffstats
path: root/widget/src/svg.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-03-21 05:52:48 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-03-21 05:52:48 +0100
commit188db4da48954b95a3fe79bcd22689ffc3a661e0 (patch)
tree8af47544c98c212b50c15e66458518974139b796 /widget/src/svg.rs
parent2b00e8b1457b0ccbafe12db3dbd6431c2c72f275 (diff)
downloadiced-188db4da48954b95a3fe79bcd22689ffc3a661e0.tar.gz
iced-188db4da48954b95a3fe79bcd22689ffc3a661e0.tar.bz2
iced-188db4da48954b95a3fe79bcd22689ffc3a661e0.zip
Draft support for dynamic custom renderer injection
Diffstat (limited to 'widget/src/svg.rs')
-rw-r--r--widget/src/svg.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/widget/src/svg.rs b/widget/src/svg.rs
index 1ac07ade..53c45bcb 100644
--- a/widget/src/svg.rs
+++ b/widget/src/svg.rs
@@ -108,7 +108,7 @@ where
limits: &layout::Limits,
) -> layout::Node {
// The raw w/h of the underlying image
- let Size { width, height } = renderer.dimensions(&self.handle);
+ let Size { width, height } = renderer.measure_svg(&self.handle);
let image_size = Size::new(width as f32, height as f32);
// The size to be available to the widget prior to `Shrink`ing
@@ -142,7 +142,7 @@ where
cursor: mouse::Cursor,
_viewport: &Rectangle,
) {
- let Size { width, height } = renderer.dimensions(&self.handle);
+ let Size { width, height } = renderer.measure_svg(&self.handle);
let image_size = Size::new(width as f32, height as f32);
let bounds = layout.bounds();
@@ -169,7 +169,7 @@ where
let appearance = (self.style)(theme, status);
- renderer.draw(
+ renderer.draw_svg(
self.handle.clone(),
appearance.color,
drawing_bounds + offset,