Gegl.Matrix3

Fields

Name

Type

Access

Description

coeff

[float]

r/w

Methods

class

new ()

copy ()

copy_into (src)

determinant ()

equal (matrix2)

identity ()

invert ()

is_affine ()

is_identity ()

is_scale ()

is_translate ()

multiply (right, product)

originate (x, y)

parse_string (string)

round_error ()

to_string ()

transform_point (x, y)

Details

class Gegl.Matrix3
classmethod new()
Returns:

A newly allocated Gegl.Matrix3

Return type:

Gegl.Matrix3

copy()
Return type:

Gegl.Matrix3

Returns a copy of src.

copy_into(src)
Parameters:

src (Gegl.Matrix3) – a Gegl.Matrix3

Copies the matrix in src into self.

determinant()
Return type:

float

Returns the determinant for the matrix.

equal(matrix2)
Parameters:

matrix2 (Gegl.Matrix3) – a Gegl.Matrix3

Return type:

bool

Check if two matrices are equal.

Returns True if the matrices are equal.

identity()

Set the provided self to the identity matrix.

invert()

Inverts self.

is_affine()
Return type:

bool

Check if a matrix only does an affine transformation.

Returns True if the matrix only does an affine transformation.

is_identity()
Return type:

bool

Check if a matrix is the identity matrix.

Returns True if the matrix is the identity matrix.

is_scale()
Return type:

bool

Check if a matrix only does scaling.

Returns True if the matrix only does scaling.

is_translate()
Return type:

bool

Check if a matrix only does translation.

Returns True if the matrix only does trasnlation.

multiply(right, product)
Parameters:

Multiples product = self · right

originate(x, y)
Parameters:
  • x (float) – x coordinate of new origin

  • y (float) – y coordinate of new origin.

Shift the origin of the transformation specified by self to (x, y). In other words, calculate the matrix that:

Translates the input by (-x, -y).

Transforms the result using the original self.

Translates the result by (x, y).

parse_string(string)
Parameters:

string (str) – a string describing the matrix (right now a small subset of the transform strings allowed by SVG)

Parse a transofmation matrix from a string.

round_error()

Rounds numerical errors in self to the nearest integer.

to_string()
Return type:

str

Serialize a Gegl.Matrix3 to a string.

Returns a freshly allocated string representing that Gegl.Matrix3, the returned string should be GLib.free()’d.

transform_point(x, y)
Parameters:
  • x (float) – pointer to an x coordinate

  • y (float) – pointer to an y coordinate

transforms the coordinates provided in x and y and changes to the coordinates gotten when the transformed with the matrix.