Matrix Struct Documentation
structMatrixNamespace:datalogics_interface
Detailed Description
The matrix is usually in the form of an array containing the six elements [a b c d h v].
A translation is specified as [ 1 0 0 1 tx ty], where tx and ty are the distance to translate from the origin of the coordinate system in the horizontal and vertical dimension, respectively.
A scaling is obtained by [sx 0 0 sy 0 0]. This scales the coordinates so that 1 unit in the horizontal and vertical dimension of the new coordinate system is the same size as sx and sy units, respectively, as in the previous coordinate system.
A rotation is produced by [ cos T sin T -sin T cos T 0 0 ], which has the effect of rotating the coordinate system axes by an angle T (degrees) counterclockwise.
This material indicates that the matrix specifying a transformation is premultiplied with the current transformation matrix, i.e.,
M' = Mt * M
The implementation of the Scale, Rotate, and Translate convenience functions of Matrix reflect the same order of operations, so that they are consistent with the PDF Reference manual. They are also consistent with the scale, rotate, and translate operators in PostScript, from which the coordinate system model in PDF is derived.
Uses types
Constructor & Destructor Documentation
Matrix
Matrix()Matrix
Matrix(doublea, doubleb, doublec, doubled, doubleh, doublev)Parameters
a: doubleb: doublec: doubled: doubleh: doublev: double
Member Function Documentation
concat
Matrixconcat(const Matrix &other)Parameters
other: const Matrix &
Returns:
Matrixinvert
Matrixinvert()Returns:
Matrixmultiply
static Matrixmultiply(const Matrix &m1, const Matrix &m2)Parameters
m1: const Matrix &m2: const Matrix &
Returns:
Matrixoperator!=
booloperator!=(const Matrix &rhs)Parameters
rhs: const Matrix &
Returns:
booloperator==
booloperator==(const Matrix &rhs)Parameters
rhs: const Matrix &
Returns:
boolrotate
Matrixrotate(doubledegrees)Parameters
degrees: double
Returns:
Matrixscale
Matrixscale(doublesx, doublesy)Parameters
sx: doublesy: double
Returns:
Matrixto_string
std::stringto_string()Returns:
std::stringtranslate
Matrixtranslate(doubletx, doublety)Parameters
tx: doublety: double