diff options
Diffstat (limited to 'graphics/src/widget/svg.rs')
-rw-r--r-- | graphics/src/widget/svg.rs | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/graphics/src/widget/svg.rs b/graphics/src/widget/svg.rs index 8b5ed66a..5817a552 100644 --- a/graphics/src/widget/svg.rs +++ b/graphics/src/widget/svg.rs @@ -1,9 +1,10 @@ //! Display vector graphics in your application. use crate::backend::{self, Backend}; -use crate::{Primitive, Renderer}; -use iced_native::{mouse, svg, Layout}; +use crate::{Primitive, Rectangle, Renderer}; +use iced_native::svg; -pub use iced_native::svg::{Handle, Svg}; +pub use iced_native::widget::svg::Svg; +pub use svg::Handle; impl<B> svg::Renderer for Renderer<B> where @@ -13,17 +14,7 @@ where self.backend().viewport_dimensions(handle) } - fn draw( - &mut self, - handle: svg::Handle, - layout: Layout<'_>, - ) -> Self::Output { - ( - Primitive::Svg { - handle, - bounds: layout.bounds(), - }, - mouse::Interaction::default(), - ) + fn draw(&mut self, handle: svg::Handle, bounds: Rectangle) { + self.draw_primitive(Primitive::Svg { handle, bounds }) } } |