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) #

Class Method Detail

def self.g_type : UInt64 #

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


def self.parse(string : String, out_transform : Gsk::Transform) : Bool #

Instance Method Detail

def category : Gsk::TransformCategory #

def equal(second : Gsk::Transform?) : Bool #

def finalize #

def invert : Gsk::Transform? #

def matrix(matrix : Graphene::Matrix) : Gsk::Transform #

def perspective(depth : Float32) : Gsk::Transform #

def print(string : GLib::String) : Nil #

def ref : Gsk::Transform? #

def rotate(angle : Float32) : Gsk::Transform? #

def rotate_3d(angle : Float32, axis : Graphene::Vec3) : Gsk::Transform? #

def scale(factor_x : Float32, factor_y : Float32) : Gsk::Transform? #

def scale_3d(factor_x : Float32, factor_y : Float32, factor_z : Float32) : Gsk::Transform? #

def skew(skew_x : Float32, skew_y : Float32) : Gsk::Transform? #

def to_2d(out_xx : Float32, out_yx : Float32, out_xy : Float32, out_yy : Float32, out_dx : Float32, out_dy : Float32) : Nil #

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 #

def to_affine(out_scale_x : Float32, out_scale_y : Float32, out_dx : Float32, out_dy : Float32) : Nil #

def to_matrix : Graphene::Matrix #

def to_string : String #

def to_translate(out_dx : Float32, out_dy : Float32) : Nil #

def to_unsafe : Pointer(Void) #

def transform(other : Gsk::Transform?) : Gsk::Transform? #

def transform_bounds(rect : Graphene::Rect) : Graphene::Rect #

def transform_point(point : Graphene::Point) : Graphene::Point #

def translate(point : Graphene::Point) : Gsk::Transform? #

def translate_3d(point : Graphene::Point3D) : Gsk::Transform? #

def unref : Nil #