PDFium Delphi Component Docs

TransformPageObjectClipPath method

Component: TPdf  ·  Unit: PDFium
Applies a transform matrix to the clip path of a single page object, leaving the object itself in place

Syntax

procedure TransformPageObjectClipPath(Index: Integer; const Matrix: FS_MATRIX);

IndexInteger. Zero-based index of the page object, in the range 0 .. ObjectCount - 1
MatrixFS_MATRIX. Affine transform (a, b, c, d, e, f) concatenated onto the existing clip path geometry

Description

Where TransformPageObject moves, scales or rotates an object, this call transforms only the object's clip path through the native entry point FPDFPageObj_TransformClipPath: the object keeps its own matrix whilst the region it is clipped to is reshaped. Use it to enlarge a clipping window after growing an object, or to reposition a clip that no longer matches its content

The matrix is concatenated with the current clip path geometry rather than replacing it, so repeated calls accumulate. Inspect the current clip first with PageObjectClipPath

The text-page cache is unloaded before the change and the page is regenerated afterwards (UpdatePage), so dependent lookups pick up the new geometry. The call requires the current page to be active, and raises an EPdfError (Page object clip path transforms are not available) when the loaded PDFium build does not export the native entry point

Remarks

Example

var
  M: FS_MATRIX;
begin
  // widen the clip region of object 4 to twice its size, same origin
  FillChar(M, SizeOf(M), 0);
  M.a := 2;
  M.d := 2;
  Pdf1.TransformPageObjectClipPath(4, M);
end;

Saved paragraph metadata

Since internal v3.403.0, direct logical text, object membership and ActualText changes clear the affected saved paragraph cluster tables Geometry, style and metadata-only changes retain the tables and regenerate complete represented shared mark scopes across adjacent nonempty streams Mark list membership is local to the selected object, whilst exact shared declarations keep their identity The bundled DLLs isolate named-property parameter edits; native builds without detachment reject a table-affecting logical change before mutation

Read the native character maps again after mutation or reload These low-level operations do not supply reviewed replacement semantics or repair arbitrary tagged ownership Use the batch semantic-edit policies when those values and bindings must be reviewed together See scope, ownership and remaining source-preservation limits

See Also

TransformPageObject, PageObjectClipPath, InsertClipPath, UpdatePageObject