Fix paths with negative coordinates in iced_tiny_skia

This commit is contained in:
Héctor Ramón Jiménez 2024-01-17 15:31:29 +01:00
parent 4cb53a6e22
commit acee3b030b
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
3 changed files with 21 additions and 18 deletions

View file

@ -543,7 +543,6 @@ impl Backend {
path,
paint,
rule,
transform,
}) => {
let bounds = path.bounds();
@ -566,9 +565,11 @@ impl Backend {
path,
paint,
*rule,
transform
.post_translate(translation.x, translation.y)
.post_scale(scale_factor, scale_factor),
tiny_skia::Transform::from_translate(
translation.x,
translation.y,
)
.post_scale(scale_factor, scale_factor),
clip_mask,
);
}
@ -576,7 +577,6 @@ impl Backend {
path,
paint,
stroke,
transform,
}) => {
let bounds = path.bounds();
@ -599,9 +599,11 @@ impl Backend {
path,
paint,
stroke,
transform
.post_translate(translation.x, translation.y)
.post_scale(scale_factor, scale_factor),
tiny_skia::Transform::from_translate(
translation.x,
translation.y,
)
.post_scale(scale_factor, scale_factor),
clip_mask,
);
}