summaryrefslogtreecommitdiffstats
path: root/wgpu/src/layer
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2023-10-24 05:34:03 +0200
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-02-02 02:24:45 +0100
commitf4d66486016076bb339a338bc589645119962d1e (patch)
treebbb9c4d996216893296cf4323857323542d6e757 /wgpu/src/layer
parenta6e91d13d5d43796d0e6bb570fb4f010cf27921a (diff)
downloadiced-f4d66486016076bb339a338bc589645119962d1e.tar.gz
iced-f4d66486016076bb339a338bc589645119962d1e.tar.bz2
iced-f4d66486016076bb339a338bc589645119962d1e.zip
Introduce `with_transformation` to `Renderer` trait
Diffstat (limited to 'wgpu/src/layer')
-rw-r--r--wgpu/src/layer/mesh.rs3
-rw-r--r--wgpu/src/layer/text.rs6
2 files changed, 4 insertions, 5 deletions
diff --git a/wgpu/src/layer/mesh.rs b/wgpu/src/layer/mesh.rs
index af3dc74a..5ed7c654 100644
--- a/wgpu/src/layer/mesh.rs
+++ b/wgpu/src/layer/mesh.rs
@@ -1,7 +1,6 @@
//! A collection of triangle primitives.
-use crate::core::Rectangle;
+use crate::core::{Rectangle, Transformation};
use crate::graphics::mesh;
-use crate::graphics::Transformation;
/// A mesh of triangles.
#[derive(Debug, Clone, Copy)]
diff --git a/wgpu/src/layer/text.rs b/wgpu/src/layer/text.rs
index 2a09aecc..4c2b66a4 100644
--- a/wgpu/src/layer/text.rs
+++ b/wgpu/src/layer/text.rs
@@ -1,6 +1,6 @@
use crate::core::alignment;
use crate::core::text;
-use crate::core::{Color, Font, Pixels, Point, Rectangle};
+use crate::core::{Color, Font, Pixels, Point, Rectangle, Transformation};
use crate::graphics;
use crate::graphics::text::editor;
use crate::graphics::text::paragraph;
@@ -15,7 +15,7 @@ pub enum Text<'a> {
position: Point,
color: Color,
clip_bounds: Rectangle,
- scale: f32,
+ transformation: Transformation,
},
/// An editor.
#[allow(missing_docs)]
@@ -24,7 +24,7 @@ pub enum Text<'a> {
position: Point,
color: Color,
clip_bounds: Rectangle,
- scale: f32,
+ transformation: Transformation,
},
/// Some cached text.
Cached(Cached<'a>),