diff options
author | 2024-08-04 04:52:55 +0200 | |
---|---|---|
committer | 2024-08-04 04:52:55 +0200 | |
commit | d4b08462e5a25929ec4df32f242898986902af56 (patch) | |
tree | 4c6aaf8519b416ebf075fd780e533543416cc81e /tiny_skia/src/engine.rs | |
parent | 8708101c892540ffc966cf7ee9d66ca5cd2e8ca6 (diff) | |
download | iced-d4b08462e5a25929ec4df32f242898986902af56.tar.gz iced-d4b08462e5a25929ec4df32f242898986902af56.tar.bz2 iced-d4b08462e5a25929ec4df32f242898986902af56.zip |
Introduce `Svg` struct in `core::svg`
Diffstat (limited to 'tiny_skia/src/engine.rs')
-rw-r--r-- | tiny_skia/src/engine.rs | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/tiny_skia/src/engine.rs b/tiny_skia/src/engine.rs index 88e8a9b1..196c36cf 100644 --- a/tiny_skia/src/engine.rs +++ b/tiny_skia/src/engine.rs @@ -580,13 +580,7 @@ impl Engine { ); } #[cfg(feature = "svg")] - Image::Vector { - handle, - color, - bounds, - rotation, - opacity, - } => { + Image::Vector(svg, bounds) => { let physical_bounds = *bounds * _transformation; if !_clip_bounds.intersects(&physical_bounds) { @@ -597,7 +591,7 @@ impl Engine { .then_some(_clip_mask as &_); let center = physical_bounds.center(); - let radians = f32::from(*rotation); + let radians = f32::from(svg.rotation); let transform = into_transform(_transformation).post_rotate_at( radians.to_degrees(), @@ -606,10 +600,10 @@ impl Engine { ); self.vector_pipeline.draw( - handle, - *color, + &svg.handle, + svg.color, physical_bounds, - *opacity, + svg.opacity, _pixels, transform, clip_mask, |