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

@ -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(),
}