pub struct OcState { /* private fields */ }Expand description
The document’s optional-content visibility under its default
configuration (/OCProperties /D, ISO 32000-1 §8.11.4.3): the set of
groups that configuration turns off. A group’s identity is its indirect
reference — groups are shared by reference between the configuration,
marked-content properties, and /OC entries (§8.11.2.1).
Everything here is lenient: an entry that is missing, malformed, or will not resolve leaves content visible, never hidden.
Implementations§
Source§impl OcState
impl OcState
Sourcepub async fn load_with<S: AsyncObjectSource>(
src: &S,
trailer: &Dict,
) -> Option<OcState>
pub async fn load_with<S: AsyncObjectSource>( src: &S, trailer: &Dict, ) -> Option<OcState>
Builds the state from the catalog’s /OCProperties, or None when
the document declares none — no optional content, everything
visible. The default /D configuration is applied in specification
order: /BaseState (default ON), then /ON, then /OFF, so a
group named in both /ON and /OFF ends up off.
Whether the configuration turns group off.
Sourcepub async fn visible_with<S: AsyncObjectSource>(
&self,
src: &S,
value: &Object,
) -> bool
pub async fn visible_with<S: AsyncObjectSource>( &self, src: &S, value: &Object, ) -> bool
Whether content gated by value — the operand of a stream or
annotation dictionary’s /OC entry — is visible: a group reference
is visible unless the group is off; a membership dictionary follows
its /VE visibility expression, else its /P policy over /OCGs.
A direct group dictionary has no
reference identity to be turned off by, and anything malformed is
left visible.
Sourcepub async fn props_visible_with<S: AsyncObjectSource>(
&self,
src: &S,
chain: &[Arc<Dict>],
props: &Object,
) -> bool
pub async fn props_visible_with<S: AsyncObjectSource>( &self, src: &S, chain: &[Arc<Dict>], props: &Object, ) -> bool
Whether a BDC /OC span is visible: props is the operator’s
properties operand — an inline dictionary, or a name looked up in
the resource chain’s /Properties category. The lookup keeps the
value unresolved, because a group’s on/off identity is its indirect
reference; resolving first would read every named group as visible.