diff options
author | 2024-08-04 04:52:55 +0200 | |
---|---|---|
committer | 2024-08-04 04:52:55 +0200 | |
commit | d4b08462e5a25929ec4df32f242898986902af56 (patch) | |
tree | 4c6aaf8519b416ebf075fd780e533543416cc81e /wgpu/src/image/mod.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 '')
-rw-r--r-- | wgpu/src/image/mod.rs | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/wgpu/src/image/mod.rs b/wgpu/src/image/mod.rs index 2b0d6251..1b16022a 100644 --- a/wgpu/src/image/mod.rs +++ b/wgpu/src/image/mod.rs @@ -246,23 +246,22 @@ impl Pipeline { Image::Raster { .. } => {} #[cfg(feature = "svg")] - Image::Vector { - handle, - color, - bounds, - rotation, - opacity, - } => { + Image::Vector(svg, bounds) => { let size = [bounds.width, bounds.height]; if let Some(atlas_entry) = cache.upload_vector( - device, encoder, handle, *color, size, scale, + device, + encoder, + &svg.handle, + svg.color, + size, + scale, ) { add_instances( [bounds.x, bounds.y], size, - f32::from(*rotation), - *opacity, + f32::from(svg.rotation), + svg.opacity, true, atlas_entry, nearest_instances, |