Implement missing draw_svg in Frame wrapper
This commit is contained in:
parent
d4b08462e5
commit
2b1b9c984a
1 changed files with 7 additions and 1 deletions
|
|
@ -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.
|
||||
///
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue