class Gsk::TextureScaleNode

Overview

A render node for a Gdk::Texture, with control over scaling.

Defined in:

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

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from class Gsk::RenderNode

==(other : self) ==, bounds : Graphene::Rect bounds, draw(cr : Cairo::Context) : Nil draw, finalize finalize, hash(hasher) hash, node_type : Gsk::RenderNodeType node_type, opaque_rect : Graphene::Rect opaque_rect, serialize : GLib::Bytes serialize, to_unsafe : Pointer(Void) to_unsafe, write_to_file(filename : String) : Bool write_to_file

Class methods inherited from class Gsk::RenderNode

deserialize(bytes : GLib::Bytes, error_func : Gsk::ParseErrorFunc | Nil, user_data : Pointer(Void) | Nil) : Gsk::RenderNode | Nil deserialize, g_type : UInt64 g_type

Constructor Detail

def self.new(texture : Gdk::Texture, bounds : Graphene::Rect, filter : Gsk::ScalingFilter) : self #

Creates a node that scales the texture to the size given by the bounds using the filter and then places it at the bounds' position.

Note that further scaling and other transformations which are applied to the node will apply linear filtering to the resulting texture, as usual.

This node is intended for tight control over scaling applied to a texture, such as in image editors and requires the application to be aware of the whole render tree as further transforms may be applied that conflict with the desired effect of this node.


def self.new #

Initialize a new TextureScaleNode.


Class Method Detail

def self.g_type : UInt64 #

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


Instance Method Detail

def ==(other : self) #
Description copied from class Reference

Returns true if this reference is the same as other. Invokes same?.


def filter : Gsk::ScalingFilter #

Retrieves the Gsk::ScalingFilter used when creating this Gsk::RenderNode.


def hash(hasher) #
Description copied from class Reference

See Object#hash(hasher)


def texture : Gdk::Texture #

Retrieves the Gdk::Texture used when creating this Gsk::RenderNode.