Transform

class Transform(pointer: <Error class: unknown class><<Error class: unknown class>>)

GskTransform is an object to describe transform matrices.

Unlike graphene_matrix_t, GskTransform retains the steps in how a transform was constructed, and allows inspecting them. It is modeled after the way CSS describes transforms.

GskTransform 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.

Skipped during bindings generation

  • parameter out_xx: out_xx: Out parameter is not supported

  • parameter out_skew_x: out_skew_x: Out parameter is not supported

  • parameter out_scale_x: out_scale_x: Out parameter is not supported

  • method to_string: C function gsk_transform_to_string is ignored

  • parameter out_dx: out_dx: Out parameter is not supported

  • parameter out_transform: out_transform: Out parameter is not supported

Constructors

Link copied to clipboard
constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val gskTransformPointer: <Error class: unknown class><<Error class: unknown class>>

Functions

Link copied to clipboard
fun equal(second: Transform? = null): Boolean

Checks two transforms for equality.

Link copied to clipboard

Returns the category this transform belongs to.

Link copied to clipboard

Inverts the given transform.

Link copied to clipboard
fun matrix(matrix: <Error class: unknown class>): Transform

Multiplies @next with the given @matrix.

Link copied to clipboard

Applies a perspective projection transform.

Link copied to clipboard
fun print(string: String)

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

Link copied to clipboard
fun ref(): Transform?

Acquires a reference on the given GskTransform.

Link copied to clipboard
fun rotate(angle: Float): Transform?

Rotates @next @angle degrees in 2D - or in 3D-speak, around the z axis.

Link copied to clipboard
fun rotate3d(angle: Float, axis: <Error class: unknown class>): Transform?

Rotates @next @angle degrees around @axis.

Link copied to clipboard
fun scale(factorX: Float, factorY: Float): Transform?

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

Link copied to clipboard
fun scale3d(factorX: Float, factorY: Float, factorZ: Float): Transform?

Scales @next by the given factors.

Link copied to clipboard
fun skew(skewX: Float, skewY: Float): Transform?

Applies a skew transform.

Link copied to clipboard
fun toMatrix(outMatrix: <Error class: unknown class>)

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

Link copied to clipboard
fun transform(other: Transform? = null): Transform?

Applies all the operations from @other to @next.

Link copied to clipboard
fun transformBounds(rect: <Error class: unknown class>, outRect: <Error class: unknown class>)

Transforms a graphene_rect_t using the given transform @self.

Link copied to clipboard
fun transformPoint(point: <Error class: unknown class>, outPoint: <Error class: unknown class>)

Transforms a graphene_point_t using the given transform @self.

Link copied to clipboard
fun translate(point: <Error class: unknown class>): Transform?

Translates @next in 2-dimensional space by @point.

Link copied to clipboard
fun translate3d(point: <Error class: unknown class>): Transform?

Translates @next by @point.

Link copied to clipboard
fun unref()

Releases a reference on the given GskTransform.