Allow only uniform scaling in Transformation

This commit is contained in:
Héctor Ramón Jiménez 2023-10-24 03:18:03 +02:00
parent aa41d7656e
commit a6e91d13d5
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
4 changed files with 16 additions and 21 deletions

View file

@ -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,