Gimp.Matrix2

Fields

Name

Type

Access

Description

coeff

[float]

r/w

the coefficients

Methods

determinant ()

identity ()

invert ()

mult (right)

transform_point (x, y)

Details

class Gimp.Matrix2

A two by two matrix.

determinant()
Returns:

The determinant.

Return type:

float

Calculates the determinant of the given matrix.

New in version 2.10.16.

identity()

Sets the matrix to the identity matrix.

invert()

Inverts the given matrix.

New in version 2.10.16.

mult(right)
Parameters:

right (Gimp.Matrix2) – The second input matrix which will be overwritten by the result.

Multiplies two matrices and puts the result into the second one.

transform_point(x, y)
Parameters:
  • x (float) – The source X coordinate.

  • y (float) – The source Y coordinate.

Returns:

newx:

The transformed X coordinate.

newy:

The transformed Y coordinate.

Return type:

(newx: float, newy: float)

Transforms a point in 2D as specified by the transformation matrix.

New in version 2.10.16.