diff --git a/crates/typst-render/src/lib.rs b/crates/typst-render/src/lib.rs index f43cd019b..2c57fe2db 100644 --- a/crates/typst-render/src/lib.rs +++ b/crates/typst-render/src/lib.rs @@ -202,7 +202,7 @@ fn render_group(canvas: &mut sk::Pixmap, state: State, pos: Point, group: &Group mask.intersect_path( &path, sk::FillRule::default(), - false, + true, sk::Transform::default(), ); storage = mask; @@ -218,7 +218,7 @@ fn render_group(canvas: &mut sk::Pixmap, state: State, pos: Point, group: &Group mask.fill_path( &path, sk::FillRule::default(), - false, + true, sk::Transform::default(), ); storage = mask; diff --git a/tests/ref/block-clip-svg-glyphs.png b/tests/ref/block-clip-svg-glyphs.png index 0fc2c962f..bf13b7ea6 100644 Binary files a/tests/ref/block-clip-svg-glyphs.png and b/tests/ref/block-clip-svg-glyphs.png differ diff --git a/tests/ref/block-clip-text.png b/tests/ref/block-clip-text.png index 8c82bc309..2b099b48a 100644 Binary files a/tests/ref/block-clip-text.png and b/tests/ref/block-clip-text.png differ diff --git a/tests/ref/block-clipping-multiple-pages.png b/tests/ref/block-clipping-multiple-pages.png index 0b6e7c85f..1305ff204 100644 Binary files a/tests/ref/block-clipping-multiple-pages.png and b/tests/ref/block-clipping-multiple-pages.png differ diff --git a/tests/ref/box-clip-radius-without-stroke.png b/tests/ref/box-clip-radius-without-stroke.png index 2be772cc5..c7d83de22 100644 Binary files a/tests/ref/box-clip-radius-without-stroke.png and b/tests/ref/box-clip-radius-without-stroke.png differ diff --git a/tests/ref/box-clip-radius.png b/tests/ref/box-clip-radius.png index 530d53309..fb27bb74d 100644 Binary files a/tests/ref/box-clip-radius.png and b/tests/ref/box-clip-radius.png differ diff --git a/tests/ref/box-clip-rect.png b/tests/ref/box-clip-rect.png index fd62bbec8..8f307f754 100644 Binary files a/tests/ref/box-clip-rect.png and b/tests/ref/box-clip-rect.png differ diff --git a/tests/ref/closure-path-resolve-in-layout-phase.png b/tests/ref/closure-path-resolve-in-layout-phase.png index a3d699981..ca22e458c 100644 Binary files a/tests/ref/closure-path-resolve-in-layout-phase.png and b/tests/ref/closure-path-resolve-in-layout-phase.png differ diff --git a/tests/ref/hide-image.png b/tests/ref/hide-image.png index d671a0734..75975d249 100644 Binary files a/tests/ref/hide-image.png and b/tests/ref/hide-image.png differ diff --git a/tests/ref/image-baseline-with-box.png b/tests/ref/image-baseline-with-box.png index ade90e2f5..37403c809 100644 Binary files a/tests/ref/image-baseline-with-box.png and b/tests/ref/image-baseline-with-box.png differ diff --git a/tests/ref/issue-5499-text-fill-in-clip-block.png b/tests/ref/issue-5499-text-fill-in-clip-block.png index 5f7962d3b..ac81fe8ef 100644 Binary files a/tests/ref/issue-5499-text-fill-in-clip-block.png and b/tests/ref/issue-5499-text-fill-in-clip-block.png differ diff --git a/tests/ref/issue-6267-clip-anti-alias.png b/tests/ref/issue-6267-clip-anti-alias.png new file mode 100644 index 000000000..00a61bc2d Binary files /dev/null and b/tests/ref/issue-6267-clip-anti-alias.png differ diff --git a/tests/ref/transform-rotate-relative-sizing.png b/tests/ref/transform-rotate-relative-sizing.png index 5951ff8ab..9b1d365df 100644 Binary files a/tests/ref/transform-rotate-relative-sizing.png and b/tests/ref/transform-rotate-relative-sizing.png differ diff --git a/tests/ref/transform-scale-relative-sizing.png b/tests/ref/transform-scale-relative-sizing.png index c53243c4b..01f0878b3 100644 Binary files a/tests/ref/transform-scale-relative-sizing.png and b/tests/ref/transform-scale-relative-sizing.png differ diff --git a/tests/ref/transform-skew-relative-sizing.png b/tests/ref/transform-skew-relative-sizing.png index af44fee98..4453a4811 100644 Binary files a/tests/ref/transform-skew-relative-sizing.png and b/tests/ref/transform-skew-relative-sizing.png differ diff --git a/tests/suite/layout/container.typ b/tests/suite/layout/container.typ index f15ddfe4a..489c88925 100644 --- a/tests/suite/layout/container.typ +++ b/tests/suite/layout/container.typ @@ -325,3 +325,10 @@ b a #block(height: -25pt)[b] c + +--- issue-6267-clip-anti-alias --- +#block( + clip: true, + radius: 100%, + rect(fill: gray, height: 1cm, width: 1cm), +)