class Gsk::TextureScaleNode
- Gsk::TextureScaleNode
- Gsk::RenderNode
- Reference
- Object
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.crConstructors
-
.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.
-
.new
Initialize a new
TextureScaleNode
.
Class Method Summary
-
.g_type : UInt64
Returns the type id (GType) registered in GLib type system.
Instance Method Summary
-
#==(other : self)
Returns
true
if this reference is the same as other. -
#filter : Gsk::ScalingFilter
Retrieves the
Gsk::ScalingFilter
used when creating thisGsk::RenderNode
. -
#hash(hasher)
See
Object#hash(hasher)
-
#texture : Gdk::Texture
Retrieves the
Gdk::Texture
used when creating thisGsk::RenderNode
.
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
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.
Class Method Detail
Instance Method Detail
Returns true
if this reference is the same as other. Invokes same?
.
Retrieves the Gsk::ScalingFilter
used when creating this Gsk::RenderNode
.