diff options
Diffstat (limited to 'wgpu/src/renderer.rs')
-rw-r--r-- | wgpu/src/renderer.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/wgpu/src/renderer.rs b/wgpu/src/renderer.rs index 7ac74e93..f46acb8c 100644 --- a/wgpu/src/renderer.rs +++ b/wgpu/src/renderer.rs @@ -239,7 +239,7 @@ impl Renderer { color: match background { Background::Color(color) => color.into_linear(), }, - border_radius: *border_radius as u32, + border_radius: *border_radius as f32, }); } Primitive::Image { path, bounds } => { @@ -327,13 +327,14 @@ impl Renderer { encoder, &layer.quads, transformation, + dpi, bounds, target, ); } if layer.images.len() > 0 { - let translated = transformation + let translated_and_scaled = transformation * Transformation::scale(dpi, dpi) * Transformation::translate( -(layer.offset.x as f32), @@ -344,7 +345,7 @@ impl Renderer { &mut self.device, encoder, &layer.images, - translated, + translated_and_scaled, bounds, target, ); |