Merge pull request #2882 from 7h0ma5/master

Fix stroke bounds calculation and clip transformations in tiny-skia backend
This commit is contained in:
Héctor 2025-11-27 03:53:48 +01:00 committed by GitHub
commit 9795a90075
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 6 deletions

View file

@ -538,10 +538,10 @@ impl Engine {
let bounds = path.bounds();
Rectangle {
x: bounds.x(),
y: bounds.y(),
width: bounds.width(),
height: bounds.height(),
x: bounds.x() - stroke.width / 2.0,
y: bounds.y() - stroke.width / 2.0,
width: bounds.width() + stroke.width,
height: bounds.height() + stroke.width,
} * transformation
};

View file

@ -191,7 +191,7 @@ impl Layer {
) {
self.primitives.push(Item::Group(
primitives,
clip_bounds,
clip_bounds * transformation,
transformation,
));
}
@ -204,7 +204,7 @@ impl Layer {
) {
self.primitives.push(Item::Cached(
primitives,
clip_bounds,
clip_bounds * transformation,
transformation,
));
}