SimplifyInkAnnotations
Annotations, Optimisation, Performance
Description
Reduces redundant points in Ink annotation strokes while keeping endpoints and the requested maximum perpendicular deviation
Syntax
Function TPDFlib.SimplifyInkAnnotations(Tolerance: Double; Options: Integer; Out Stats: TPDFlibInkSimplificationStats): Integer;
Parameters
| Tolerance | Maximum geometric deviation in current document units and must be greater than 0 |
|---|---|
| Options | Bit 1 limits processing to the selected page; bit 2 preserves sharp corner anchors; bit 4 leaves existing appearances unchanged instead of rebuilding changed Ink appearances |
| Stats | Receives page, annotation, stroke, point and appearance counters |
Return values
The number of Ink annotations whose point arrays were reduced
Remarks
The iterative simplifier has a per-stroke operation budget; if a hostile or pathological stroke reaches the budget, unresolved points are retained so the tolerance guarantee is never weakened
Unless option bit 4 is set, changed appearances are rebuilt immediately and the original selected page is restored after document-wide processing