Transform

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.

Constructors

this
this()

Members

Functions

equal
bool equal(gsk.transform.Transform second)

Checks two transforms for equality.

getCategory
gsk.types.TransformCategory getCategory()

Returns the category this transform belongs to.

invert
gsk.transform.Transform invert()

Inverts the given transform.

matrix
gsk.transform.Transform matrix(graphene.matrix.Matrix matrix)

Multiplies next with the given matrix.

perspective
gsk.transform.Transform perspective(float depth)

Applies a perspective projection transform.

print
void print(glib.string_.String string_)

Converts self into a human-readable string representation suitable for printing.

rotate
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).

rotate3d
gsk.transform.Transform rotate3d(float angle, graphene.vec3.Vec3 axis)

Rotates next angle degrees around axis.

scale
gsk.transform.Transform scale(float factorX, float factorY)

Scales next in 2-dimensional space by the given factors.

scale3d
gsk.transform.Transform scale3d(float factorX, float factorY, float factorZ)

Scales next by the given factors.

skew
gsk.transform.Transform skew(float skewX, float skewY)

Applies a skew transform.

to2d
void to2d(float outXx, float outYx, float outXy, float outYy, float outDx, float outDy)

Converts a gsk.transform.Transform to a 2D transformation matrix.

to2dComponents
void to2dComponents(float outSkewX, float outSkewY, float outScaleX, float outScaleY, float outAngle, float outDx, float outDy)

Converts a gsk.transform.Transform to 2D transformation factors.

toAffine
void toAffine(float outScaleX, float outScaleY, float outDx, float outDy)

Converts a gsk.transform.Transform to 2D affine transformation factors.

toMatrix
void toMatrix(graphene.matrix.Matrix outMatrix)

Computes the actual value of self and stores it in out_matrix.

toString_
string toString_()

Converts a matrix into a string that is suitable for printing.

toTranslate
void toTranslate(float outDx, float outDy)

Converts a gsk.transform.Transform to a translation operation.

transform
gsk.transform.Transform transform(gsk.transform.Transform other)

Applies all the operations from other to next.

transformBounds
void transformBounds(graphene.rect.Rect rect, graphene.rect.Rect outRect)

Transforms a graphene.rect.Rect using the given transform self.

transformPoint
void transformPoint(graphene.point.Point point, graphene.point.Point outPoint)

Transforms a graphene.point.Point using the given transform self.

translate
gsk.transform.Transform translate(graphene.point.Point point)

Translates next in 2-dimensional space by point.

translate3d
gsk.transform.Transform translate3d(graphene.point3_d.Point3D point)

Translates next by point.

Static functions

parse
bool parse(string string_, gsk.transform.Transform outTransform)

Parses the given string into a transform and puts it in out_transform.

Inherited Members

From Boxed

cInstancePtr
void* cInstancePtr;

Pointer to the C boxed value

getType
GType getType()

Get the GType of this boxed type.

gType
GType gType [@property getter]

Boxed GType property.

self
Boxed self()

Convenience method to return this cast to a type. For use in D with statements.

copy_
void* copy_()

Make a copy of the wrapped C boxed data.

boxedCopy
void* boxedCopy(void* cBoxed)

Copy a C boxed value using g_boxed_copy.

boxedFree
void boxedFree(void* cBoxed)

Free a C boxed value using g_boxed_free.