mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-29 12:38:58 -06:00
Review of #4898 (FredApps): - An image or nested group of another blend mode than the pass's composited its layer at opacity 0, on the assumption that its shape was cleared first. `knockout_image` skips images with an `/SMask` and stencil masks, so a white Difference square stayed under a blue Normal masked image in the Difference pass and turned it yellow. The layer now composites with `Compose::DestOut` at full opacity and no soft mask, clearing exactly its coverage. - In another pass (and an erase pass), a shading cleared under its path before the mesh-extent check that makes an off-page mesh paint nothing, so a Difference `sh` of such a mesh erased the blue under it. The clear now makes the same decision (`shading_bbox`, `mesh_area`, shared with the paint path). Tests: `it::knockout_backdrop` gains a masked image, a stencil and an off-page mesh case; each fails with its half of the fix reverted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SqmHYx8FiWM5PcsoiErgp9