QMedia Movie track commands |

### QM_SetTrackMatrix

QM_SetTrackMatrix(movieRef; trackID; trackMatrix):error
| movieRef | Longint | Movie reference
| trackID | Longint | Track ID
| trackMatrix | Array real | Track matrix
| error | Longint | Error result

Changes the transormation matrix of a track.

Parameter movieRef is the reference to the movie instance. The movie reference must have been previously obtained with a call to QM_NewMovieFromFile or QM_NewMovieFromURL.

Parameter trackID is the ID of the track.

Parameter trackMatrix specifies the track's transformation matrix. The track matrix must be declared as a 3 x 3 array of reals.

Example

``Rotate track ID $trackID of movie $movie by 30 degrees around its center` `` `ARRAY REAL($matrix;3;3)` `$err:=QM_SetIdentityMatrix ($matrix)` `` `C_REAL($trachWidth;$trackHeight)` `$err:=QM_GetTrackDimensions ($movie;$trackID;$trachWidth;$trackHeight)` `` `C_REAL($degrees;$hAnchor;$vAnchor)` `$degrees:=30 `Rotate 30 degrees` `$hAnchor:=$trachWidth/2 `Anchor at center of track` `$vAnchor:=$trackHeight/2` `$err:=QM_RotateMatrix ($matrix;$degrees;$hAnchor;$vAnchor)` `` `$err:=QM_SetTrackMatrix ($movie;$trackID;$matrix)` ``

Related commands

QM_GetTrackMatrix | Returns the track's transormation matrix.
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.

QMedia © Escape OE
Generated by QDoc 2.8 on Thu, Nov 24, 2011 18:41:18