ImageEn, unit iexPdfiumCore

TPdfObject.Matrix

TPdfObject.Matrix


Declaration

property Matrix: TFSMatrix;


Description

Specifies the matrix of a page object

A matrix is defined as:


It can be adjusted to scale, rotate, shear and translate objects, but you are better to use one of the following:
 X
 Y
 Width
 Height
 Matrix
 Scale
 Translate

Note:
 You must call ImageEnView1.Invalidate() after setting the matrix
 To apply a matrix tranformation, rather than replacing the existing matrix, use TransformEx

Read/write


Examples

// Display the object matrix
matrix := ImageEnView1.PdfViewer.Objects[idx].Matrix;
lblMatrix.Caption := Format( 'Matrix: %0.2f, %0.2f, %0.2f, %0.2f, %0.2f, %0.2f', [ matrix.a, matrix.b, matrix.c, matrix.d, matrix.e, matrix.f ]);

// Mirror (flip) an object
mx := ImageEnView1.PdfViewer.Objects[idx].Matrix;
mx.a := -1 * mx.a;  // flip horizontally
mx.d := -1 * mx.d;  // flip vertically
ImageEnView1.PdfViewer.Objects[idx].Matrix := mx;