Method XbpPresSpace():setGraTransform() Foundation

Sets or returns the graphic transformation matrix.

:setGraTransform( [<aMatrix>], [<nMode>] ) --> aOldMatrix
<aMatrix> := GraInitMatrix()
The <aMatrix> parameter is a three dimensional array containing the transformation matrix. It can be created using the function GraInitMatrix() and can be set or retrieved by calling :setGraTransform().
The optional parameter <nMode> must contain a #define constant from the following table:
Constants for graphic transformations
Constant Description
GRA_TRANSFORM_REPLACE *) Replace the existing transformation in <aMatrix> after the transformation
GRA_TRANSFORM_ADD Keep the existing transformation in <aMatrix> and calculate an additional transformation
  1. Default value

The :setGraTransform() method returns a copy of the current transformation matrix. When a new matrix is set using the parameter <aMatrix>, this method returns the previous transformation matrix.


The method :setGraTransform() defines a transformation matrix for the presentation space. Graphic transformations are calculated using the functions GraRotate(), GraScale() or GraTranslate() (rotation, scaling, and translation, respectively). The result of these calculations is contained in the transformation matrix <aMatrix>. After the calculation, the matrix can be passed to the presentation space and the transformation becomes effective for graphic output.


If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.