Merge pull request #2882 from 7h0ma5/master
Fix stroke bounds calculation and clip transformations in tiny-skia backend
This commit is contained in:
commit
9795a90075
2 changed files with 6 additions and 6 deletions
|
|
@ -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
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue