class Gsk::Transform

Overview

Gsk::Transform is an object to describe transform matrices.

Unlike graphene_::matrix_t, Gsk::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 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.

Defined in:

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

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(pointer : Pointer(Void), transfer : GICrystal::Transfer) #

[View source]

Class Method Detail

def self.g_type : UInt64 #

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


[View source]
def self.parse(string : String, out_transform : Gsk::Transform) : Bool #

[View source]

Instance Method Detail

def category : Gsk::TransformCategory #

[View source]
def equal(second : Gsk::Transform | Nil) : Bool #

[View source]
def finalize #

[View source]
def invert : Gsk::Transform | Nil #

[View source]
def matrix(matrix : Graphene::Matrix) : Gsk::Transform #

[View source]
def perspective(depth : Float32) : Gsk::Transform #

[View source]
def print(string : GLib::String) : Nil #

[View source]
def ref : Gsk::Transform | Nil #

[View source]
def rotate(angle : Float32) : Gsk::Transform | Nil #

[View source]
def rotate_3d(angle : Float32, axis : Graphene::Vec3) : Gsk::Transform | Nil #

[View source]
def scale(factor_x : Float32, factor_y : Float32) : Gsk::Transform | Nil #

[View source]
def scale_3d(factor_x : Float32, factor_y : Float32, factor_z : Float32) : Gsk::Transform | Nil #

[View source]
def skew(skew_x : Float32, skew_y : Float32) : Gsk::Transform | Nil #

[View source]
def to_2d(out_xx : Float32, out_yx : Float32, out_xy : Float32, out_yy : Float32, out_dx : Float32, out_dy : Float32) : Nil #

[View source]
def to_2d_components(out_skew_x : Float32, out_skew_y : Float32, out_scale_x : Float32, out_scale_y : Float32, out_angle : Float32, out_dx : Float32, out_dy : Float32) : Nil #

[View source]
def to_affine(out_scale_x : Float32, out_scale_y : Float32, out_dx : Float32, out_dy : Float32) : Nil #

[View source]
def to_matrix : Graphene::Matrix #

[View source]
def to_string : String #

[View source]
def to_translate(out_dx : Float32, out_dy : Float32) : Nil #

[View source]
def to_unsafe : Pointer(Void) #

[View source]
def transform(other : Gsk::Transform | Nil) : Gsk::Transform | Nil #

[View source]
def transform_bounds(rect : Graphene::Rect) : Graphene::Rect #

[View source]
def transform_point(point : Graphene::Point) : Graphene::Point #

[View source]
def translate(point : Graphene::Point) : Gsk::Transform | Nil #

[View source]
def translate_3d(point : Graphene::Point3D) : Gsk::Transform | Nil #

[View source]
def unref : Nil #

[View source]