From ba05164bb67071bfaab858daf2fb2b3387cc17c5 Mon Sep 17 00:00:00 2001 From: Anton Wetzel <59712243+antonWetzel@users.noreply.github.com> Date: Wed, 8 Nov 2023 15:30:00 +0100 Subject: Change rectangle clip to use the inside of the stroke, not the middle. (#2626) --- crates/typst-library/src/layout/container.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/typst-library/src/layout') 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)); } } -- cgit v1.2.3