Repository navigation
Description
Context
DESIGN.md section 10. #606 added Paths, whose soft_mask column indexes Paths.soft_masks, the distinct soft masks of the page. hayro 0.9 (#609) reduced a soft mask to its type, so that tuple now holds at most the two values of SoftMaskType, in the order in which the page first paints them. A reader has to go through it to read what the other enum columns (fill_rule, stroke_cap, stroke_join, blend_mode) state directly.
No release holds Paths yet, so this changes no released API. The owner chose this change in the working session of 2026-11-04, after #606's layout had been agreed.
Goal
soft_mask holds the position of the soft mask's type in SoftMaskType, or -1 where the path has none, and Paths.soft_masks no longer exists.
Scope
In:
- The column as an int8, which Arrow imports as
int8, null where it is -1. - Removing
Paths.soft_masksand what only it needs in the binding. - The tests, the API reference, and the column sizes in
evidence/path-columns/.
Out:
- The rest of the layout.
- Removing
SoftMask.xref, which Move to hayro 0.9 with LaurenzV/hayro#1734 patched in, and read streams that name a file #609 deprecated.
Paths
crates/pyropdf-python/src/buffers.rs, python/pyropdf/_content.py, python/pyropdf/_core.pyi, tests/test_path_columns.py, docs/en/api/text-and-content.md, and evidence/path-columns/.
Acceptance
- On every corpus page, and on a page that paints a luminosity mask before an alpha mask,
soft_maskholds the position ofPath.soft_mask.subtypeinSoftMaskType, or -1 - NumPy reads the column as int8, and Arrow imports it as
int8, null where it is -1 -
Pathshas nosoft_masks, andevidence/path-columns/shows the new size of the columns
Notes
The row view builds each SoftMask with _soft_mask, as Content does, so the records still equal Content.paths.
Activity
yhay81 commentedon Nov 3, 2026
Claimed on branch
claude/618-soft-mask-type.yhay81 commentedon Nov 3, 2026
Handoff: branch
claude/618-soft-mask-type, PR #621, which waits for the owner's review. It is not merged, and auto-merge is off.What changed.
soft_maskis an int8: the position inSoftMaskType, or -1. Its Arrow field isint8, null where it is -1.Paths.soft_masksandPathColumns.soft_masksare gone.SoftMaskwith_soft_mask, asContentdoes.Checks.
python tools/check.py --lockedpasses on Windows 11.tests/test_path_columns.pypass locally. CI skips them because it installs neither.Evidence.
evidence/path-columns/results/windows-amd64.md: the columns hold 221 bytes a path on the line pages (115 for the path and 53 per segment), and the other figures stay within the machine's noise.Next.
Hold the type of a soft mask in the path columns (#618) (#621)