Class TextureScaleNode
java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.gobject.TypeInstance
org.gnome.gsk.RenderNode
org.gnome.gsk.TextureScaleNode
- All Implemented Interfaces:
Proxy
A render node for a
GdkTexture, with control over scaling.- Since:
- 4.10
-
Nested Class Summary
Nested classes/interfaces inherited from class RenderNode
RenderNode.RenderNode$Impl -
Constructor Summary
ConstructorsConstructorDescriptionTextureScaleNode(MemorySegment address) Create a TextureScaleNode instance for the provided memory address.TextureScaleNode(Texture texture, Rect bounds, ScalingFilter filter) 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. -
Method Summary
Modifier and TypeMethodDescriptionprotected TextureScaleNodeasParent()Return this instance as if it were its parent type.Retrieves theGskScalingFilterused when creating thisGskRenderNode.static MemoryLayoutThe memory layout of the native struct.Retrieves theGdkTextureused when creating thisGskRenderNode.static @Nullable TypegetType()Get the GType of the TextureScaleNode class.Methods inherited from class RenderNode
deserialize, draw, getBounds, getChildren, getNodeType, getOpaqueRect, ref, serialize, unref, writeToFileMethods inherited from class TypeInstance
callParent, callParent, cast, getPrivate, readGClass, writeGClassMethods inherited from class ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
TextureScaleNode
Create a TextureScaleNode instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
TextureScaleNode
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.
- Parameters:
texture- the texture to scalebounds- the size of the texture to scale tofilter- how to scale the texture- Since:
- 4.10
-
-
Method Details
-
getType
Get the GType of the TextureScaleNode class.- Returns:
- the GType
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
asParent
Return this instance as if it were its parent type. Comparable to the Javasuperkeyword, but ensures the parent typeclass is also used in native code.- Overrides:
asParentin classRenderNode- Returns:
- the instance as if it were its parent type
-
getFilter
Retrieves theGskScalingFilterused when creating thisGskRenderNode.- Returns:
- the
GskScalingFilter - Since:
- 4.10
-
getTexture
Retrieves theGdkTextureused when creating thisGskRenderNode.- Returns:
- the
GdkTexture - Since:
- 4.10
-