Declaration
function CreateMatrix(m11, m12, m21, m22: single; dx, dy: single): Pointer;
Description
Creates a matrix to be used to apply a world transformation to the canvas content (using
MatrixTransform).
Afterwards, you must free the matrix, using
DeleteMatrixNote: Use
ResetTransform to reset the transformation
GDI+ Method:
GdipCreateMatrix2// Use a matrix to position the drawing of a rectangle
// Create the transformation matrix
matrix := IECanvas.CreateMatrix( 2.33, // m11
0, // m12
0, // m21
-2.33, // m22
-171.93, // dx
1091.96 ); // dy
try
// Apply the matrix transformation
IECanvas.MatrixTransform( Matrix );
// Now draw the rectangle with the transformation applied
IECanvas.Rectangle( 50, 50, 100, 100 );
finally
// Free the matrix
IECanvas.DeleteMatrix( Matrix );
end;