From d4b08462e5a25929ec4df32f242898986902af56 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sun, 4 Aug 2024 04:52:55 +0200 Subject: Introduce `Svg` struct in `core::svg` --- graphics/src/geometry/frame.rs | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) (limited to 'graphics/src/geometry') diff --git a/graphics/src/geometry/frame.rs b/graphics/src/geometry/frame.rs index 1a7af8e6..f3c0817c 100644 --- a/graphics/src/geometry/frame.rs +++ b/graphics/src/geometry/frame.rs @@ -1,7 +1,6 @@ //! Draw and generate geometry. -use crate::core::svg; -use crate::core::{Color, Point, Radians, Rectangle, Size, Vector}; -use crate::geometry::{self, Fill, Image, Path, Stroke, Text}; +use crate::core::{Point, Radians, Rectangle, Size, Vector}; +use crate::geometry::{self, Fill, Image, Path, Stroke, Svg, Text}; /// The region of a surface that can be used to draw geometry. #[allow(missing_debug_implementations)] @@ -206,15 +205,7 @@ pub trait Backend: Sized { ); fn draw_image(&mut self, bounds: Rectangle, image: impl Into); - - fn draw_svg( - &mut self, - handle: &svg::Handle, - bounds: Rectangle, - color: Option, - rotation: Radians, - opacity: f32, - ); + fn draw_svg(&mut self, bounds: Rectangle, svg: impl Into); fn into_geometry(self) -> Self::Geometry; } @@ -262,17 +253,8 @@ impl Backend for () { ) { } - fn into_geometry(self) -> Self::Geometry {} - fn draw_image(&mut self, _bounds: Rectangle, _image: impl Into) {} + fn draw_svg(&mut self, _bounds: Rectangle, _svg: impl Into) {} - fn draw_svg( - &mut self, - _handle: &svg::Handle, - _bounds: Rectangle, - _color: Option, - _rotation: Radians, - _opacity: f32, - ) { - } + fn into_geometry(self) -> Self::Geometry {} } -- cgit