From a6e91d13d5d43796d0e6bb570fb4f010cf27921a Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Tue, 24 Oct 2023 03:18:03 +0200 Subject: Allow only uniform scaling in `Transformation` --- wgpu/src/backend.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'wgpu/src/backend.rs') diff --git a/wgpu/src/backend.rs b/wgpu/src/backend.rs index 25134d68..e86e52c4 100644 --- a/wgpu/src/backend.rs +++ b/wgpu/src/backend.rs @@ -147,8 +147,8 @@ impl Backend { } if !layer.meshes.is_empty() { - let scaled = transformation - * Transformation::scale(scale_factor, scale_factor); + let scaled = + transformation * Transformation::scale(scale_factor); self.triangle_pipeline.prepare( device, @@ -161,8 +161,8 @@ impl Backend { #[cfg(any(feature = "image", feature = "svg"))] { if !layer.images.is_empty() { - let scaled = transformation - * Transformation::scale(scale_factor, scale_factor); + let scaled = + transformation * Transformation::scale(scale_factor); self.image_pipeline.prepare( device, -- cgit From f4d66486016076bb339a338bc589645119962d1e Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Tue, 24 Oct 2023 05:34:03 +0200 Subject: Introduce `with_transformation` to `Renderer` trait --- wgpu/src/backend.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'wgpu/src/backend.rs') diff --git a/wgpu/src/backend.rs b/wgpu/src/backend.rs index e86e52c4..77b6fa83 100644 --- a/wgpu/src/backend.rs +++ b/wgpu/src/backend.rs @@ -1,7 +1,7 @@ -use crate::core::{Color, Size}; +use crate::core::{Color, Size, Transformation}; use crate::graphics::backend; use crate::graphics::color; -use crate::graphics::{Transformation, Viewport}; +use crate::graphics::Viewport; use crate::primitive::pipeline; use crate::primitive::{self, Primitive}; use crate::quad; -- cgit