Gimp.Matrix3¶
Fields¶
Name |
Type |
Access |
Description |
---|---|---|---|
coeff |
[ |
r/w |
the coefficients |
Methods¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- class Gimp.Matrix3¶
A three by three matrix.
- affine(a, b, c, d, e, f)¶
- Parameters:
Applies the affine transformation given by six values to self. The six values form define an affine transformation matrix as illustrated below:
( a c e ) ( b d f ) ( 0 0 1 )
- determinant()¶
- Returns:
The determinant.
- Return type:
Calculates the determinant of the given matrix.
- equal(matrix2)¶
- Parameters:
matrix2 (
Gimp.Matrix3
) – The second matrix- Returns:
- Return type:
Checks if two matrices are equal.
New in version 2.10.16.
- identity()¶
Sets the matrix to the identity matrix.
- invert()¶
Inverts the given matrix.
- is_affine()¶
-
Checks if the given matrix defines an affine transformation.
New in version 2.4.
- is_diagonal()¶
-
Checks if the given matrix is diagonal.
- is_identity()¶
-
Checks if the given matrix is the identity matrix.
- is_simple()¶
- Returns:
True
if all entries of the upper left 2x2 matrix are either 0 or 1,False
otherwise- Return type:
Checks if we’ll need to interpolate when applying this matrix as a transformation.
- mult(right)¶
- Parameters:
right (
Gimp.Matrix3
) – The second input matrix which will be overwritten by the result.
Multiplies two matrices and puts the result into the second one.
- rotate(theta)¶
- Parameters:
theta (
float
) – The angle of rotation (in radians).
Rotates the matrix by theta degrees.
- scale(x, y)¶
-
Scales the matrix by x and y
- transform_point(x, y, newx, newy)¶
- Parameters:
Transforms a point in 2D as specified by the transformation matrix.
- translate(x, y)¶
-
Translates the matrix by x and y.