summaryrefslogtreecommitdiffstats
path: root/wgpu
diff options
context:
space:
mode:
Diffstat (limited to 'wgpu')
-rw-r--r--wgpu/Cargo.toml2
-rw-r--r--wgpu/src/image/vector.rs6
2 files changed, 5 insertions, 3 deletions
diff --git a/wgpu/Cargo.toml b/wgpu/Cargo.toml
index 14dcd550..ffae6e4a 100644
--- a/wgpu/Cargo.toml
+++ b/wgpu/Cargo.toml
@@ -58,7 +58,7 @@ version = "1.0"
optional = true
[dependencies.resvg]
-version = "0.29"
+version = "0.32"
optional = true
[dependencies.tracing]
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(),