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

FirstInstructionZero-based index of the first instruction in the range
LastInstructionZero-based index of the last instruction in the range, inclusive
M11First scale and rotation coefficient of the affine matrix
M12Second scale and rotation coefficient of the affine matrix
M21Third scale and rotation coefficient of the affine matrix
M22Fourth scale and rotation coefficient of the affine matrix
MDXHorizontal translation of the affine matrix
MDYVertical 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