GetPageElementClipPathInfo

Content stream editing, Clipping paths

Description

Returns one integer property for a component in an enumerated page element's effective clipping intersection chain

Syntax

Delphi

Function TPDFlib.GetPageElementClipPathInfo(ElementID, ClipPathIndex, InfoIndex: Integer): Integer;

Parameters

ElementIDOpaque page-element handle
ClipPathIndex1-based component index
InfoIndexProperty selector from the table below

Properties

0Component kind: 1 initial page boundary, 2 path, 3 text outline marker, 4 Form boundary
1Fill rule: 0 not applicable, 1 non-zero winding, 2 even-odd
2Stored segment count
31 when component bounds are known
41 when the component region is exactly represented by its rectangular bounds
51 when the component is known to be empty
61 when the source is a complete top-level path object that can be replaced or deleted safely
71-based source content layer, or 0 for a synthetic, nested, malformed or cross-layer component
8Zero-based first source instruction, or -1 when no editable source exists
9Zero-based W or W* instruction, or -1 when none exists
10Zero-based terminating path-painting instruction, or -1 when none exists
11Source Form nesting depth

Return value

The requested value, or zero for an invalid handle, component or selector

Remarks

Text clipping is represented as a marker because glyph outlines are font-dependent; use GetPageElementEffectiveClipInfo to test whether the complete region is reconstructable from stored segments

Instruction selectors are diagnostic unless property 6 is one; editable source is also protected by a normalized fingerprint that is checked during mutation