summaryrefslogtreecommitdiffstats
path: root/wgpu/src/layer.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2023-10-24 03:18:03 +0200
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-02-02 01:57:03 +0100
commita6e91d13d5d43796d0e6bb570fb4f010cf27921a (patch)
tree209fad24b9cc5549842269d6a1d667aa02215976 /wgpu/src/layer.rs
parentaa41d7656e734b5dae3c19dff87afbc74617a67f (diff)
downloadiced-a6e91d13d5d43796d0e6bb570fb4f010cf27921a.tar.gz
iced-a6e91d13d5d43796d0e6bb570fb4f010cf27921a.tar.bz2
iced-a6e91d13d5d43796d0e6bb570fb4f010cf27921a.zip
Allow only uniform scaling in `Transformation`
Diffstat (limited to 'wgpu/src/layer.rs')
-rw-r--r--wgpu/src/layer.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/wgpu/src/layer.rs b/wgpu/src/layer.rs
index 82e8ba02..4a2e72df 100644
--- a/wgpu/src/layer.rs
+++ b/wgpu/src/layer.rs
@@ -133,7 +133,7 @@ impl<'a> Layer<'a> {
position: *position * transformation,
color: *color,
clip_bounds: *clip_bounds * transformation,
- scale: transformation.scale_y(),
+ scale: transformation.scale_factor(),
});
}
Primitive::Editor {
@@ -149,7 +149,7 @@ impl<'a> Layer<'a> {
position: *position * transformation,
color: *color,
clip_bounds: *clip_bounds * transformation,
- scale: transformation.scale_y(),
+ scale: transformation.scale_factor(),
});
}
Primitive::Text {
@@ -169,7 +169,7 @@ impl<'a> Layer<'a> {
layer.text.push(Text::Cached(text::Cached {
content,
bounds: *bounds * transformation,
- size: *size * transformation.scale_y(),
+ size: *size * transformation.scale_factor(),
line_height: *line_height,
color: *color,
font: *font,