WrapRangeWithMatrix
Content stream editing
Description
Isolates one inclusive instruction range with q and Q and concatenates an affine matrix ahead of it
Syntax
Delphi
Function TPDFContentProgram.WrapRangeWithMatrix(FirstInstruction, LastInstruction: Integer;
M11, M12, M21, M22, MDX, MDY: Double): Boolean;Parameters
FirstInstruction | Zero-based index of the first instruction in the range |
|---|---|
LastInstruction | Zero-based index of the last instruction in the range, inclusive |
M11 | First scale and rotation coefficient of the affine matrix |
M12 | Second scale and rotation coefficient of the affine matrix |
M21 | Third scale and rotation coefficient of the affine matrix |
M22 | Fourth scale and rotation coefficient of the affine matrix |
MDX | Horizontal translation of the affine matrix |
MDY | Vertical translation of the affine matrix |
Return values
True when the range was wrapped, otherwise false
Remarks
The q/Q pair isolates the enclosed range so the surrounding graphics state stays intact, and the matrix is concatenated before the range
Use it on complete non-text paint objects
See also
FindInstructionsInRect, EmitRange, DeleteRange, TPDFContentProgram