This class allows you to handle transformation matrices to define graphical operations that are performed on movies or still images when they
are displayed.
A transformation matrix defines how to map points from one coordinate space into another coordinate space.
By modifying the contents of a transformation matrix, you can perform several standard graphical display operations, including translation,
rotation, and scaling. The matrix used to accomplish two–dimensional transformations is described mathematically by
a 3–by–3 matrix.
The QTPlgMatrix class provides a set of functions that make it easy for you to manipulate translation matrices.
Since version 6.7 of the plugin this class can be used in Console Applications
The QTPlgMatrix class constructors are called when you create a new instance of the class, while
the ˜QTPlgMatrix class destructor, is called automatically when the
class is no more in use. Also, you can invoke the class destructor by setting the instance of the class to nil.
A QTPlgMatrix object is always
.
The class provides you with the following initializer methods:
This is the default constructor. The matrix is initialized to an identity matrix that is a matrix that performs no transformations and the
is set to (0,0)
This is the copy constructor. If the object to be copied is valid, then its properties will be used to
initialize the new class instance properties
specifies the matrix type. The value returned is one of the
defined by the class
specifies the x and y coordinates of the anchor point. The default value is (0,0)
use this method to reset the matrix to its default status (that is an identity matrix)
this method allows you to inspect the content of the 3x3 matrix array
using this method modifies the current matrix so that it performs a transformation in the rectangle specified by the
dstRect parameter that is analogous to the transformation it currently performs in the rectangle specified by the
srcRect parameter. This method affects only the scaling and translation attributes of the matrix.
this method allows you to modify the current matrix so that it flips an image along the x–axis (if the
xAxis parameter
is set to
true) and/or horizontally (if the
yAxis parameter
is set to
true)
this method updates the contents of the matrix so that the it describes a rotation operation; that is, it concatenates the rotation
transformations onto whatever was initially in the matrix structure. You specify the direction and amount of rotation with the
degrees parameter. You specify the point of rotation with the
class property.
modifies the contents of the matrix so that it defines a skew transformation; this method concatenates the respective transformations onto
whatever was initially in the matrix structure. You specify the magnitude
and direction of the skew operation with the
dx and
dy parameters. You specify the anchor point
for this operation with the
class property.
this method updates the contents of the matrix so that it describes a scaling operation; that is, it concatenates the respective transformations
onto whatever was initially in the matrix structure. You specify the magnitude of the scaling operation with the
xScale and
yScale parameters. You specify the anchor point
for this operation with the
class property.
adds a translation value to a specified matrix. The amount of translation is specified by the
dx and
dy parameters
use the + Realbasic operator to create a new matrix that combines two matrices by concatenating them. Notes that
the order in which the matrices are concatenated is important; matrix operations are not commutative
use the ! Realbasic operator to creates a new matrix that is the inverse of the current matrix
the matrix is an identity matrix
the matrix defines a translation operation
the matrix defines a scaling operation
the matrix defines both a translation and a scaling operation
the matrix is a general 2x2 matrix
the matrix is a general 2x2 matrix and translates
the matrix is a general 3x3 matrix