summaryrefslogtreecommitdiff
path: root/crates/typst-layout/src/inline
diff options
context:
space:
mode:
authorEric Biedert <github@ericbiedert.de>2024-10-28 15:31:00 +0100
committerGitHub <noreply@github.com>2024-10-28 14:31:00 +0000
commit45377f25ecbd33b56ec5fcd1335f20b13488a93d (patch)
tree994bd469ffbadbafdba62f44143c1fbbcfb2b812 /crates/typst-layout/src/inline
parent6dd05cc17ab0a1d6ddbc11854d1a662d91da142f (diff)
Fix clipping with outset (#5295)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
Diffstat (limited to 'crates/typst-layout/src/inline')
-rw-r--r--crates/typst-layout/src/inline/box.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/typst-layout/src/inline/box.rs b/crates/typst-layout/src/inline/box.rs
index 30572e4e..62054bea 100644
--- a/crates/typst-layout/src/inline/box.rs
+++ b/crates/typst-layout/src/inline/box.rs
@@ -61,8 +61,7 @@ pub fn layout_box(
// Clip the contents, if requested.
if elem.clip(styles) {
- let size = frame.size() + outset.relative_to(frame.size()).sum_by_axis();
- frame.clip(clip_rect(size, &radius, &stroke));
+ frame.clip(clip_rect(frame.size(), &radius, &stroke, &outset));
}
// Add fill and/or stroke.