Files
pdfcraft/crates/render/tests/it/main.rs
T
KenM76andClaude Opus 5.5 ad33ab626e fix(render): a non-isolated knockout group blends its elements with the page under it
A non-isolated knockout group starts from the backdrop under it (ISO 32000-2
§11.4.7, §11.4.8), but was drawn into a layer of its own starting transparent,
so a blend mode inside it had nothing to blend with: white with /BM /Difference
over magenta stayed white (#4886).

Entered plainly (full opacity, no soft mask, Normal, not itself a knockout
element), the group is now drawn once per blend mode its elements use. Each pass
is a knockout layer composited onto the backdrop in that mode; elements of other
modes clear what is under their shape instead of painting. The Normal pass finds
the other modes, so a group without blend modes takes one pass as before.

hayro-interpret patch 67 (Device::begin_knockout_pass / end_knockout_pass,
draw_knockout_passes), hayro patch 26 (the renderer side). Test:
pdfcraft-render it::knockout_backdrop, three cases failing with the fix
reverted, plus an isolated-group control.

Fixes #4886

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SqmHYx8FiWM5PcsoiErgp9
2026-10-26 20:18:32 -04:00

14 lines
313 B
Rust

//! The crate's integration tests, linked into one test binary.
mod cid_fallback_query;
mod inline_image_ei;
mod jbig2_invariants;
mod knockout_backdrop;
mod luminosity_group_space;
mod named_form_properties;
mod search;
mod separation_all;
mod substitute_widths;
mod tiling_cell_placement;
mod type3_text_clip;