Expand description
Per-render OCG visibility overrides.
LayerSet is the renderer-side contract for “which OCGs are
currently on”. The display list carries every OcgGroup’s
per-variant default_visible fallback baked from the document’s
default configuration, but a consumer building a layer panel needs
to flip a layer on or off without re-parsing the PDF or rebuilding
its display list.
The flow:
- The PDF reader (or any other producer) builds a display list
whose
crate::display_list::DisplayElement::OcgGroupelements each carry ancrate::display_list::OcgVisibilitypredicate. - The consumer constructs a
LayerSet— empty (every OCG falls back to itsdefault_visible) or populated from a particular PDF configuration. - Mutate it as needed, e.g. via
LayerSet::set. - Pass it into the renderer; rendering calls
LayerSet::evaluatefor each OcgGroup.
Higher-level constructors that build a LayerSet from a parsed
document live in stet-pdf-reader’s layers module.
Structs§
- Layer
Set - Per-render override of OCG visibility.