diff options
author | 2023-04-26 16:46:27 +0200 | |
---|---|---|
committer | 2023-04-26 16:46:27 +0200 | |
commit | 9c63eb7df559e58b14188b4096e9bd206444bbf3 (patch) | |
tree | 23bc9de2e8a83358c6c08d0b689d8345b9af3f6e /wgpu/src/image | |
parent | e63cc181bddbdc0a5b9b091cfeee5e4343b3d906 (diff) | |
download | iced-9c63eb7df559e58b14188b4096e9bd206444bbf3.tar.gz iced-9c63eb7df559e58b14188b4096e9bd206444bbf3.tar.bz2 iced-9c63eb7df559e58b14188b4096e9bd206444bbf3.zip |
Update `tiny-skia` and `resvg`
Diffstat (limited to 'wgpu/src/image')
-rw-r--r-- | wgpu/src/image/vector.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/wgpu/src/image/vector.rs b/wgpu/src/image/vector.rs index 3624e46b..58bdf64a 100644 --- a/wgpu/src/image/vector.rs +++ b/wgpu/src/image/vector.rs @@ -43,6 +43,8 @@ type ColorFilter = Option<[u8; 4]>; impl Cache { /// Load svg pub fn load(&mut self, handle: &svg::Handle) -> &Svg { + use usvg::TreeParsing; + if self.svgs.contains_key(&handle.id()) { return self.svgs.get(&handle.id()).unwrap(); } @@ -116,9 +118,9 @@ impl Cache { resvg::render( tree, if width > height { - usvg::FitTo::Width(width) + resvg::FitTo::Width(width) } else { - usvg::FitTo::Height(height) + resvg::FitTo::Height(height) }, tiny_skia::Transform::default(), img.as_mut(), |