summaryrefslogtreecommitdiff
path: root/crates/typst-library
diff options
context:
space:
mode:
authorAnton Wetzel <59712243+antonWetzel@users.noreply.github.com>2023-11-08 15:30:00 +0100
committerGitHub <noreply@github.com>2023-11-08 15:30:00 +0100
commitba05164bb67071bfaab858daf2fb2b3387cc17c5 (patch)
tree34ab64f84aa106d7340b6397ff9c1014a36c06b2 /crates/typst-library
parent46846a337e8084acd46c70bccc2fca2659e9fb9a (diff)
Change rectangle clip to use the inside of the stroke, not the middle. (#2626)
Diffstat (limited to 'crates/typst-library')
-rw-r--r--crates/typst-library/src/layout/container.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/typst-library/src/layout/container.rs b/crates/typst-library/src/layout/container.rs
index 36b62864..2e6ccdd2 100644
--- a/crates/typst-library/src/layout/container.rs
+++ b/crates/typst-library/src/layout/container.rs
@@ -155,7 +155,7 @@ impl Layout for BoxElem {
let outset = self.outset(styles).relative_to(frame.size());
let size = frame.size() + outset.sum_by_axis();
let radius = self.radius(styles);
- frame.clip(path_rect(size, radius, &stroke));
+ frame.clip(clip_rect(size, radius, &stroke));
}
// Add fill and/or stroke.
@@ -421,7 +421,7 @@ impl Layout for BlockElem {
let outset = self.outset(styles).relative_to(frame.size());
let size = frame.size() + outset.sum_by_axis();
let radius = self.radius(styles);
- frame.clip(path_rect(size, radius, &stroke));
+ frame.clip(clip_rect(size, radius, &stroke));
}
}