ImageEn, unit iegdiplus

TIECanvas.MatrixTransform

TIECanvas.MatrixTransform


Declaration

procedure MatrixTransform(Matrix: Pointer);


Description

Apply a world transformation to the canvas content.
You can create a matrix using CreateMatrix. Afterwards, you must free the matrix, using DeleteMatrix

Note: Use ResetTransform to reset the transformation

GDI+ Method: GdipSetWorldTransform


Example

// 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;