enum Gsk::TransformCategory

Overview

The categories of matrices relevant for GSK and GTK.

Note that any category includes matrices of all later categories. So if you want to for example check if a matrix is a 2D matrix, category >= GSK_TRANSFORM_CATEGORY_2D is the way to do this.

Also keep in mind that rounding errors may cause matrices to not conform to their categories. Otherwise, matrix operations done via multiplication will not worsen categories. So for the matrix multiplication C = A * B, category(C) = MIN (category(A), category(B)).

Defined in:

lib/gi-crystal/src/auto/gsk-4.0/gsk.cr

Enum Members

Unknown = 0_u32

The category of the matrix has not been determined.

Any = 1_u32

Analyzing the matrix concluded that it does not fit in any other category.

G3d = 2_u32

The matrix is a 3D matrix. This means that the w column (the last column) has the values (0, 0, 0, 1).

G2d = 3_u32

The matrix is a 2D matrix. This is equivalent to graphene_::matrix_is_2d() returning true. In particular, this means that Cairo can deal with the matrix.

G2dAffine = 4_u32

The matrix is a combination of 2D scale and 2D translation operations. In particular, this means that any rectangle can be transformed exactly using this matrix.

G2dTranslate = 5_u32

The matrix is a 2D translation.

Identity = 6_u32

The matrix is the identity matrix.

Class Method Summary

Instance Method Summary

Class methods inherited from struct Enum

g_type : UInt64 g_type

Class Method Detail

def self.g_type : UInt64 #

Returns the type id (GType) registered in GLib type system.


Instance Method Detail

def any? #

def g2d? #

def g2d_affine? #

def g2d_translate? #

def g3d? #

def identity? #

def unknown? #