QuickTime makes extensive use of transformation matrices to define graphical operations that are performed on movies and tracks when they are displayed.
A transformation matrix defines how to map points from one coordinate space into another. By modifying the contents of a transformation matrix, you can perform translation, rotation, scaling and skeweing.
It is known from mathematics, that in order to accomplish two-dimensional transformations, we need a 3-by-3 matrix - so does QuickTime too. The elements of the 3x3 matrix contain numbers that affect several geometrical properties along both axes (horizontal and vertical). A transformation matrix that performs no transformation, is called identity matrix. The identity matrix is the starting point when manipulating matrices.
Manipulating matrices is not too complicated, but it can be confusing to database developers. QMedia provides commands for manipulating matrices that are much closer to 4D and to the requirements of database developers.
In QMedia, you do not need to think of the transformation matrix in terms of mathematics; there are specific commands that you invoke for each kind of transformation you want to do. These commands will transparently take care of all underlying mathematics.
The above commands are used solely for preparing a matrix that will do a specific transformation. Yet, matrices exist to be used somehow and there exist commands for applying a matrix to a movie track, video media or text media (eg, QM_SetTrackMatrix).
|QM_SetIdentityMatrix||Sets the contents of a matrix record to the identity matrix.|
|QM_TranslateMatrix||Adds a translation transformation to a matrix record.|
|QM_ScaleMatrix||Adds a scaling transformation to a matrix record.|
|QM_RotateMatrix||Adds a rotation transformation to a matrix record.|
|QM_SkewMatrix||Adds a skew transformation to a matrix record.|
|QM_ConcatMatrix||Concatenates two matrices.|