Class juce.AffineTransform
A geometric transformation.
Is converted to a JUCE AffineTransform.
The default constructor makes an identity transform, so all kinds of transformations can be created as follows :
rot180 = juce.AffineTransform():rotated(math.pi)
chainey = juce.AffineTransform():scaled(2.5):translated(140,140)
Constructors
juce.AffineTransform (mat00, mat01, mat02, mat10, mat11, mat12) | Constuctor. |
Methods
juce.AffineTransform:translated (dx, dy) | Translated. |
juce.AffineTransform:rotated (rad) | Rotated. |
juce.AffineTransform:scaled (scaleX[, scaleY=scaleX]) | Scaled. |
juce.AffineTransform:followedBy (other) | Followed by. |
Fields
juce.AffineTransform.mat00 | Matrix [0] [0] |
juce.AffineTransform.mat01 | Matrix [0] [1] |
juce.AffineTransform.mat02 | Matrix [0] [2] |
juce.AffineTransform.mat10 | Matrix [1] [0] |
juce.AffineTransform.mat11 | Matrix [1] [1] |
juce.AffineTransform.mat12 | Matrix [1] [2] |
Predefined values
juce.AffineTransform.identity | Identity. |
Constructors
- juce.AffineTransform (mat00, mat01, mat02, mat10, mat11, mat12)
-
Constuctor. parameters thusly define a transformation matrix :
(mat00 mat01 mat02) (mat10 mat11 mat12) (0 0 1)
Parameters:
- mat00
- mat01
- mat02
- mat10
- mat11
- mat12
Methods
- juce.AffineTransform:translated (dx, dy)
-
Translated.
Parameters:
- dx the horizontal offset
- dy the vertical offset
Returns:
-
a translated version of this transform
- juce.AffineTransform:rotated (rad)
-
Rotated.
Parameters:
- rad the degree of rotation in radians
Returns:
-
a rotated version of this transform
- juce.AffineTransform:scaled (scaleX[, scaleY=scaleX])
-
Scaled.
Parameters:
- scaleX
- scaleY (default scaleX)
Returns:
-
a scaled version of this transform
- juce.AffineTransform:followedBy (other)
-
Followed by.
Parameters:
- other
Returns:
-
a version of this transform followed by another
Fields
- juce.AffineTransform.mat00
- Matrix [0] [0]
- juce.AffineTransform.mat01
- Matrix [0] [1]
- juce.AffineTransform.mat02
- Matrix [0] [2]
- juce.AffineTransform.mat10
- Matrix [1] [0]
- juce.AffineTransform.mat11
- Matrix [1] [1]
- juce.AffineTransform.mat12
- Matrix [1] [2]