ComputeAppearanceMatrix(PdfRectangle, PdfRectangle, Matrix) Method

Definition

Assembly Broadside.dll

Computes the matrix that maps an appearance's form space to default user space so that the appearance fills the annotation rectangle: Algorithm "Appearance streams" of ISO 32000-2 §12.5.5.

public static Matrix? ComputeAppearanceMatrix(PdfRectangle rect, PdfRectangle boundingBox, Matrix matrix)

Parameters

rect
PdfRectangle

The annotation rectangle (normalized).

boundingBox
PdfRectangle

The appearance's BBox, in form space.

matrix
Matrix

The appearance's Matrix.

Returns

Nullable<Matrix>
The matrix AA = Matrix × A, where A maps the transformed bounding box onto the rectangle; null when either has zero width or height (nothing can be drawn).

Remarks

ISO 32000-2 §12.5.5: the bounding box is transformed by the form matrix and the smallest upright rectangle containing the result is mapped onto rect (lower-left to lower-left, upper-right to upper-right). The appearance's content is painted with this matrix concatenated to the page's CTM and clipped to its bounding box in form space; the form matrix is already part of the result and shall not be applied again.