From 2b1b9c984ac1b290c351d0a9edc7bca69f8bd526 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sun, 4 Aug 2024 05:03:48 +0200 Subject: Implement missing `draw_svg` in `Frame` wrapper --- graphics/src/geometry/frame.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'graphics') 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) { 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) { + self.raw.draw_svg(bounds, svg); + } + /// Stores the current transform of the [`Frame`] and executes the given /// drawing operations, restoring the transform afterwards. /// -- cgit