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) nothrow
GType _getGType() static nothrow
GType _gType() @property nothrow
Transform self() nothrowReturns `this`, for use in `with` statements.
bool equal(gsk.transform.Transform second = null) nothrowChecks two transforms for equality.
gsk.types.TransformCategory getCategory() nothrowReturns the category this transform belongs to. Returns: The category of the transform
gsk.transform.Transform invert() nothrowInverts the given transform.
gsk.transform.Transform matrix(graphene.matrix.Matrix matrix) nothrowMultiplies next with the given matrix.
gsk.transform.Transform perspective(float depth) nothrowApplies a perspective projection transform.
void print(glib.string_.String string_) nothrowConverts self into a human-readable string representation suitable for printing.
gsk.transform.Transform rotate(float angle) nothrowRotates 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) nothrowRotates next angle degrees around axis.
gsk.transform.Transform scale(float factorX, float factorY) nothrowScales next in 2-dimensional space by the given factors.
gsk.transform.Transform scale3d(float factorX, float factorY, float factorZ) nothrowScales next by the given factors.
gsk.transform.Transform skew(float skewX, float skewY) nothrowApplies a skew transform.
void to2d(out float outXx, out float outYx, out float outXy, out float outYy, out float outDx, out float outDy) nothrowConverts 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) nothrowConverts a [gsk.transform.Transform] to 2D transformation factors.
void toAffine(out float outScaleX, out float outScaleY, out float outDx, out float outDy) nothrowConverts a [gsk.transform.Transform] to 2D affine transformation factors.
void toMatrix(out graphene.matrix.Matrix outMatrix) nothrowComputes the actual value of self and stores it in out_matrix.
string toString_() nothrowConverts a matrix into a string that is suitable for printing.
void toTranslate(out float outDx, out float outDy) nothrowConverts a [gsk.transform.Transform] to a translation operation.
gsk.transform.Transform transform(gsk.transform.Transform other = null) nothrowApplies all the operations from other to next.
void transformBounds(graphene.rect.Rect rect, out graphene.rect.Rect outRect) nothrowTransforms a [graphene.rect.Rect] using the given transform self.
void transformPoint(graphene.point.Point point, out graphene.point.Point outPoint) nothrowTransforms a [graphene.point.Point] using the given transform self.
gsk.transform.Transform translate(graphene.point.Point point) nothrowTranslates next in 2-dimensional space by point.
gsk.transform.Transform translate3d(graphene.point3_d.Point3D point) nothrowTranslates next by point.
bool parse(string string_, out gsk.transform.Transform outTransform) static nothrowParses the given string into a transform and puts it in out_transform.
Constructors
this(void * ptr, Flag!"Take" take)