geomerative
index
 
Name getCenteringTransf ( )
Examples
None available
Description Use this method to get the transformation matrix in order to fit and center the element on the canvas. Scaling and translation damping parameters are available, in order to create animations.
Syntax
getCenteringTransf(g, margin, sclDamping, trnsDamping);
getCenteringTransf(g);
getCenteringTransf(g, margin);
Parameters
PGraphics   g, the canvas to which to fit and center the path
float   margin, the margin to take into account when fitting
float   sclDamping, a value from 0 to 1. The damping coefficient for the scale, if the value is 0, then no scaling is applied.
float   trnsDamping, a value from 0 to 1. The damping coefficient for the translation, if the value is 0, then no translation is applied.
Returns RMatrix, the transformation matrix
Usage Web & Application
Related getBounds ( )