Introduce Svg struct in core::svg

This commit is contained in:
Héctor Ramón Jiménez 2024-08-04 04:52:55 +02:00
parent 8708101c89
commit d4b08462e5
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
18 changed files with 146 additions and 257 deletions

View file

@ -396,23 +396,9 @@ impl core::svg::Renderer for Renderer {
self.engine.vector_pipeline.viewport_dimensions(handle)
}
fn draw_svg(
&mut self,
handle: core::svg::Handle,
color: Option<Color>,
bounds: Rectangle,
rotation: core::Radians,
opacity: f32,
) {
fn draw_svg(&mut self, svg: core::Svg, bounds: Rectangle) {
let (layer, transformation) = self.layers.current_mut();
layer.draw_svg(
handle,
color,
bounds,
transformation,
rotation,
opacity,
);
layer.draw_svg(svg, bounds, transformation);
}
}