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(); let bounds = path.bounds();
Rectangle { Rectangle {
x: bounds.x(), x: bounds.x() - stroke.width / 2.0,
y: bounds.y(), y: bounds.y() - stroke.width / 2.0,
width: bounds.width(), width: bounds.width() + stroke.width,
height: bounds.height(), height: bounds.height() + stroke.width,
} * transformation } * transformation
}; };

View file

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