diff --git a/crates/typst-render/src/lib.rs b/crates/typst-render/src/lib.rs index f43cd019..2c57fe2d 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 0fc2c962..bf13b7ea 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 8c82bc30..2b099b48 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 0b6e7c85..1305ff20 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 2be772cc..c7d83de2 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 530d5330..fb27bb74 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 fd62bbec..8f307f75 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 a3d69998..ca22e458 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 d671a073..75975d24 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 ade90e2f..37403c80 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 5f7962d3..ac81fe8e 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 00000000..00a61bc2 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 5951ff8a..9b1d365d 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 c53243c4..01f0878b 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 af44fee9..4453a481 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 f15ddfe4..489c8892 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), +)