Transform
Object Hierarchy:
Description:
[ CCode ( ref_function = "gsk_transform_ref" , type_id = "gsk_transform_get_type ()" , unref_function = "gsk_transform_unref" ) ]
[ Compact ]
public class Transform
[ Compact ]
public class Transform
The `GskTransform` structure contains only private data.
Namespace: Gsk
Package: gtk4
Content:
Static methods:
- public static bool parse (string string, out Transform out_transform)
Parses the given
string
into a transform and puts it inout_transform
.
Creation methods:
- public Transform ()
Methods:
- public unowned Transform @ref ()
Acquires a reference on the given Transform.
- public bool equal (Transform? second)
Checks two transforms for equality.
- public TransformCategory get_category ()
Returns the category this transform belongs to.
- public Transform? invert ()
Inverts the given transform.
- public Transform matrix (Matrix matrix)
Multiplies this with the given
matrix
. - public Transform perspective (float depth)
Applies a perspective projection transform.
- public void print (StringBuilder string)
Converts this into a human-readable string representation suitable for printing that can later be parsed with parse .
- public Transform rotate (float angle)
Rotates this
angle
degrees in 2D - or in 3Dspeak, around the z axis. - public Transform rotate_3d (float angle, Vec3 axis)
Rotates this
angle
degrees aroundaxis
. - public Transform scale (float factor_x, float factor_y)
Scales this in 2-dimensional space by the given factors.
- public Transform scale_3d (float factor_x, float factor_y, float factor_z)
Scales this by the given factors.
- public void to_2d (out float out_xx, out float out_yx, out float out_xy, out float out_yy, out float out_dx, out float out_dy)
Converts a Transform to a 2D transformation matrix.
- public void to_affine (out float out_scale_x, out float out_scale_y, out float out_dx, out float out_dy)
Converts a Transform to 2D affine transformation factors.
- public Matrix to_matrix ()
Computes the actual value of this and stores it in
out_matrix
. - public string to_string ()
Converts a matrix into a string that is suitable for printing and can later be parsed with parse.
- public void to_translate (out float out_dx, out float out_dy)
Converts a Transform to a translation operation.
- public Transform transform (Transform? other)
Applies all the operations from
other
to this. - public Rect transform_bounds (Rect rect)
Transforms a Rect using the given transform this.
- public Point transform_point (Point point)
Transforms a Point using the given transform this .
- public Transform translate (Point point)
Translates this in 2dimensional space by
point
. - public Transform translate_3d (Point3D point)
Translates this by
point
. - public void unref ()
Releases a reference on the given Transform.