Implement missing draw_svg in Frame wrapper

This commit is contained in:
Héctor Ramón Jiménez 2024-08-04 05:03:48 +02:00
parent d4b08462e5
commit 2b1b9c984a
No known key found for this signature in database
GPG key ID: 7CC46565708259A7

View file

@ -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.
///