summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-08-04 05:03:48 +0200
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-08-04 05:03:48 +0200
commit2b1b9c984ac1b290c351d0a9edc7bca69f8bd526 (patch)
treec5ad0ad80b55b4b5bfe04724491add039514efee /graphics
parentd4b08462e5a25929ec4df32f242898986902af56 (diff)
downloadiced-2b1b9c984ac1b290c351d0a9edc7bca69f8bd526.tar.gz
iced-2b1b9c984ac1b290c351d0a9edc7bca69f8bd526.tar.bz2
iced-2b1b9c984ac1b290c351d0a9edc7bca69f8bd526.zip
Implement missing `draw_svg` in `Frame` wrapper
Diffstat (limited to 'graphics')
-rw-r--r--graphics/src/geometry/frame.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/graphics/src/geometry/frame.rs b/graphics/src/geometry/frame.rs
index f3c0817c..b5f2f139 100644
--- a/graphics/src/geometry/frame.rs
+++ b/graphics/src/geometry/frame.rs
@@ -75,12 +75,18 @@ where
self.raw.fill_text(text);
}
- /// Draws the given image on the [`Frame`] inside the given bounds.
+ /// Draws the given [`Image`] on the [`Frame`] inside the given bounds.
#[cfg(feature = "image")]
pub fn draw_image(&mut self, bounds: Rectangle, image: impl Into<Image>) {
self.raw.draw_image(bounds, image);
}
+ /// Draws the given [`Svg`] on the [`Frame`] inside the given bounds.
+ #[cfg(feature = "svg")]
+ pub fn draw_svg(&mut self, bounds: Rectangle, svg: impl Into<Svg>) {
+ self.raw.draw_svg(bounds, svg);
+ }
+
/// Stores the current transform of the [`Frame`] and executes the given
/// drawing operations, restoring the transform afterwards.
///