Optionalproperties: Partial<{}>Checks two transforms for equality.
Optionalsecond: Transformthe second transform
true if the two transforms perform the same operation
Returns the category this transform belongs to.
The category of the transform
Inverts the given transform.
If self is not invertible, NULL is returned.
Note that inverting NULL also returns NULL, which is
the correct inverse of NULL. If you need to differentiate
between those cases, you should check self is not NULL
before calling this function.
This function consumes self. Use Gsk.Transform.ref first
if you want to keep it around.
The inverted transform
Multiplies next with the given matrix.
This function consumes next. Use Gsk.Transform.ref first
if you want to keep it around.
The new transform
Applies a perspective projection transform.
This transform scales points in X and Y based on their Z value, scaling points with positive Z values away from the origin, and those with negative Z values towards the origin. Points on the z=0 plane are unchanged.
This function consumes next. Use Gsk.Transform.ref first
if you want to keep it around.
distance of the z=0 plane. Lower values give a more flattened pyramid and therefore a more pronounced perspective effect.
The new transform
Converts the transform into a human-readable representation.
The result of this function can later be parsed with Gsk.Transform.parse.
Acquires a reference on the given transform.
the transform with an additional reference
Rotates next by an angle around the Z axis.
The rotation happens around the origin point of (0, 0).
This function consumes next. Use Gsk.Transform.ref first
if you want to keep it around.
the rotation angle, in degrees (clockwise)
The new transform
Rotates next angle degrees around axis.
For a rotation in 2D space, use Gsk.Transform.rotate
This function consumes next. Use Gsk.Transform.ref first
if you want to keep it around.
the rotation angle, in degrees (clockwise)
The rotation axis
The new transform
Scales next in 2-dimensional space by the given factors.
Use Gsk.Transform.scale_3d to scale in all 3 dimensions.
This function consumes next. Use Gsk.Transform.ref first
if you want to keep it around.
scaling factor on the X axis
scaling factor on the Y axis
The new transform
Scales next by the given factors.
This function consumes next. Use Gsk.Transform.ref first
if you want to keep it around.
scaling factor on the X axis
scaling factor on the Y axis
scaling factor on the Z axis
The new transform
Applies a skew transform.
This function consumes next. Use Gsk.Transform.ref first
if you want to keep it around.
skew factor, in degrees, on the X axis
skew factor, in degrees, on the Y axis
The new transform
Converts a transform to a 2D transformation matrix.
self must be a 2D transformation. If you are not
sure, use
`gsk_transform_get_category()` >= GSK_TRANSFORM_CATEGORY_2D
to check.
The returned values are a subset of the full 4x4 matrix that is computed by Gsk.Transform.to_matrix and have the following layout:
| xx yx | | a b 0 |
| xy yy | = | c d 0 |
| dx dy | | tx ty 1 |
This function can be used to convert between a Gsk.Transform and a matrix type from other 2D drawing libraries, in particular Cairo.
Converts a transform to 2D transformation factors.
To recreate an equivalent transform from the factors returned by this function, use
gsk_transform_skew (
gsk_transform_scale (
gsk_transform_rotate (
gsk_transform_translate (NULL, &GRAPHENE_POINT_T (dx, dy)),
angle),
scale_x, scale_y),
skew_x, skew_y)
self must be a 2D transformation. If you are not sure, use
`gsk_transform_get_category()` >= GSK_TRANSFORM_CATEGORY_2D
to check.
Converts a transform to 2D affine transformation factors.
To recreate an equivalent transform from the factors returned by this function, use
gsk_transform_scale (
gsk_transform_translate (
NULL,
&GRAPHENE_POINT_T (dx, dy)),
sx, sy)
self must be a 2D affine transformation. If you are not
sure, use
`gsk_transform_get_category()` >= GSK_TRANSFORM_CATEGORY_2D_AFFINE
to check.
Converts the transform into a human-readable string.
The resulting string can be parsed with Gsk.Transform.parse.
This is a wrapper around Gsk.Transform.print.
A new string for self
Converts a transform to a translation operation.
self must be a 2D transformation. If you are not
sure, use
`gsk_transform_get_category()` >= GSK_TRANSFORM_CATEGORY_2D_TRANSLATE
to check.
Applies all the operations from other to next.
This function consumes next. Use Gsk.Transform.ref first
if you want to keep it around.
Optionalother: Transformtransform to apply
The new transform
Translates next in 2-dimensional space by point.
This function consumes next. Use Gsk.Transform.ref first
if you want to keep it around.
The new transform
Translates next by point.
This function consumes next. Use Gsk.Transform.ref first
if you want to keep it around.
the point to translate the transform by
The new transform
Releases a reference on the given transform.
If the reference was the last, the resources associated to the self are
freed.
StaticnewStaticparseParses a given into a transform.
Strings printed via Gsk.Transform.to_string can be read in again successfully using this function.
If string does not describe a valid transform, false
is returned and NULL is put in out_transform.
the string to parse
Describes a 3D transform.
Unlike
graphene_matrix_t, Gsk.Transform retains the steps in how a transform was constructed, and allows inspecting them. It is modeled after the way CSS describes transforms.Gsk.Transform objects are immutable and cannot be changed after creation. This means code can safely expose them as properties of objects without having to worry about others changing them.