TransformPageElement

Content stream editing

Description

Applies an affine matrix to one exact text, image, or path paint object. Image and path instructions are isolated by balanced graphics-state operators. Text is split into valid text objects around the transformed display instruction, then its original invisible advance and text state are reconstructed without duplicating extracted text

Syntax

Delphi

Function TPDFlib.TransformPageElement(ElementID: Integer; M11, M12, M21, M22, MDX, MDY: Double): Integer;

ActiveX

Function PDFlib::TransformPageElement(ElementID As Long, M11 As Double, M12 As Double, M21 As Double, M22 As Double, MDX As Double, MDY As Double) As Long

DLL

int DLTransformPageElement(int InstanceID, int ElementID, double M11, double M12, double M21, double M22, double MDX, double MDY);

Parameters

ElementIDOpaque handle returned by GetEnumeratedPageElementID; it must belong to the selected document and match the layer fingerprint captured at enumeration
M11, M12Horizontal and vertical components of the transformed x axis
M21, M22Horizontal and vertical components of the transformed y axis
MDX, MDYTranslation applied to the paint object, in page units

Return values

1The element was transformed and all snapshot handles were invalidated
0The handle is stale, the matrix is not finite, or the text state cannot be reconstructed safely

Remarks

Text rendering modes that create clipping paths are rejected because isolating them would change the persistent clip semantics