summaryrefslogtreecommitdiffstats
path: root/tiny_skia
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 /tiny_skia
parentaa41d7656e734b5dae3c19dff87afbc74617a67f (diff)
downloadiced-a6e91d13d5d43796d0e6bb570fb4f010cf27921a.tar.gz
iced-a6e91d13d5d43796d0e6bb570fb4f010cf27921a.tar.bz2
iced-a6e91d13d5d43796d0e6bb570fb4f010cf27921a.zip
Allow only uniform scaling in `Transformation`
Diffstat (limited to 'tiny_skia')
-rw-r--r--tiny_skia/src/backend.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/tiny_skia/src/backend.rs b/tiny_skia/src/backend.rs
index 87007a51..9c03818f 100644
--- a/tiny_skia/src/backend.rs
+++ b/tiny_skia/src/backend.rs
@@ -461,7 +461,7 @@ impl Backend {
paragraph,
*position * transformation,
*color,
- scale_factor,
+ scale_factor * transformation.scale_factor(),
pixels,
clip_mask,
);
@@ -523,7 +523,7 @@ impl Backend {
*horizontal_alignment,
*vertical_alignment,
*shaping,
- scale_factor,
+ scale_factor * transformation.scale_factor(),
pixels,
clip_mask,
);
@@ -770,10 +770,10 @@ fn into_color(color: Color) -> tiny_skia::Color {
fn into_transform(transformation: Transformation) -> tiny_skia::Transform {
tiny_skia::Transform {
- sx: transformation.scale_x(),
+ sx: transformation.scale_factor(),
kx: 0.0,
ky: 0.0,
- sy: transformation.scale_y(),
+ sy: transformation.scale_factor(),
tx: transformation.translation_x(),
ty: transformation.translation_y(),
}