ImageEn, unit iexPdfiumCore |
|
TPdfObject.Matrix
Declaration
property Matrix: TFSMatrix;
Description
Specify 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◼TranslateNote: To apply a matrix tranformation, rather than replacing the existing matrix, use
TransformExRead/write
// 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;