mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-26 02:58:32 -06:00
In a knockout group (/K true) each element composites with the group's initial backdrop, not with the elements drawn before it (ISO 32000-2, knockout groups). The renderer read /K (hayro-interpret patch 28) but drew such a group like any other, so overlapping semi-transparent shapes in it blended with each other. hayro-interpret patch (39) tells the device a group is a knockout group (`Device::set_knockout`, default no-op). hayro patch (19) then draws that group's fills, strokes, glyph outlines and shadings with Compose::Copy, which vello_cpu weights by coverage, so each replaces what the group drew under its shape. Images and nested groups are drawn into a group layer of their own and still composite normally: copying a whole layer would erase everything outside it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RUNQSPVXx3dDBabRZHAnjz