gsk.transform

Module for [Transform] class

class Transform

Types 1

[gsk.transform.Transform] is an object to describe transform matrices.

Unlike [graphene.matrix.Matrix], [gsk.transform.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.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.

Methods
void * _cPtr(Flag!"Dup" dup = No.Dup)
GType _gType() @property
Transform self()Returns `this`, for use in `with` statements.
bool equal(gsk.transform.Transform second = null)Checks two transforms for equality.
gsk.types.TransformCategory getCategory()Returns the category this transform belongs to. Returns: The category of the transform
gsk.transform.Transform invert()Inverts the given transform.
gsk.transform.Transform matrix(graphene.matrix.Matrix matrix)Multiplies next with the given matrix.
gsk.transform.Transform perspective(float depth)Applies a perspective projection transform.
void print(glib.string_.String string_)Converts self into a human-readable string representation suitable for printing.
gsk.transform.Transform rotate(float angle)Rotates next angle degrees in 2D - or in 3D-speak, around the Z axis. The rotation happens around the origin point of (0, 0).
gsk.transform.Transform rotate3d(float angle, graphene.vec3.Vec3 axis)Rotates next angle degrees around axis.
gsk.transform.Transform scale(float factorX, float factorY)Scales next in 2-dimensional space by the given factors.
gsk.transform.Transform scale3d(float factorX, float factorY, float factorZ)Scales next by the given factors.
gsk.transform.Transform skew(float skewX, float skewY)Applies a skew transform.
void to2d(out float outXx, out float outYx, out float outXy, out float outYy, out float outDx, out float outDy)Converts a [gsk.transform.Transform] to a 2D transformation matrix.
void to2dComponents(out float outSkewX, out float outSkewY, out float outScaleX, out float outScaleY, out float outAngle, out float outDx, out float outDy)Converts a [gsk.transform.Transform] to 2D transformation factors.
void toAffine(out float outScaleX, out float outScaleY, out float outDx, out float outDy)Converts a [gsk.transform.Transform] to 2D affine transformation factors.
void toMatrix(out graphene.matrix.Matrix outMatrix)Computes the actual value of self and stores it in out_matrix.
string toString_()Converts a matrix into a string that is suitable for printing.
void toTranslate(out float outDx, out float outDy)Converts a [gsk.transform.Transform] to a translation operation.
gsk.transform.Transform transform(gsk.transform.Transform other = null)Applies all the operations from other to next.
void transformBounds(graphene.rect.Rect rect, out graphene.rect.Rect outRect)Transforms a [graphene.rect.Rect] using the given transform self.
void transformPoint(graphene.point.Point point, out graphene.point.Point outPoint)Transforms a [graphene.point.Point] using the given transform self.
gsk.transform.Transform translate(graphene.point.Point point)Translates next in 2-dimensional space by point.
bool parse(string string_, out gsk.transform.Transform outTransform)Parses the given string into a transform and puts it in out_transform.
Constructors
this(void * ptr, Flag!"Take" take)