summaryrefslogtreecommitdiffstats
path: root/wgpu/src/renderer.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--wgpu/src/renderer.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/wgpu/src/renderer.rs b/wgpu/src/renderer.rs
index fa52bd96..365ef1ef 100644
--- a/wgpu/src/renderer.rs
+++ b/wgpu/src/renderer.rs
@@ -1,4 +1,4 @@
-use crate::{quad, text, Image, Primitive, Quad, Transformation};
+use crate::{image, quad, text, Image, Primitive, Quad, Transformation};
use iced_native::{
renderer::{Debugger, Windowed},
Background, Color, Layout, MouseCursor, Point, Rectangle, Vector, Widget,
@@ -232,7 +232,14 @@ impl Renderer {
}
Primitive::Image { handle, bounds } => {
layer.images.push(Image {
- handle: handle.clone(),
+ handle: image::Handle::Raster(handle.clone()),
+ position: [bounds.x, bounds.y],
+ scale: [bounds.width, bounds.height],
+ });
+ }
+ Primitive::Svg { handle, bounds } => {
+ layer.images.push(Image {
+ handle: image::Handle::Vector(handle.clone()),
position: [bounds.x, bounds.y],
scale: [bounds.width, bounds.height],
});
@@ -342,6 +349,7 @@ impl Renderer {
translated_and_scaled,
bounds,
target,
+ dpi,
);
}