Package org.gnome.gsk
Class TextureScaleNode
java.lang.Object
io.github.jwharm.javagi.base.ProxyInstance
org.gnome.gobject.TypeInstance
org.gnome.gsk.RenderNode
org.gnome.gsk.TextureScaleNode
-
Nested Class Summary
Nested classes/interfaces inherited from class org.gnome.gsk.RenderNode
RenderNode.RenderNodeImpl
-
Constructor Summary
ConstructorDescriptionTextureScaleNode
(MemorySegment address) Create a TextureScaleNode proxy 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 TextureScaleNode
asParent()
Returns this instance as if it were its parent type.Retrieves theGskScalingFilter
used when creating thisGskRenderNode
.Retrieves theGdkTexture
used when creating thisGskRenderNode
.static Type
getType()
Get the GType of the TextureScaleNode classMethods inherited from class org.gnome.gsk.RenderNode
deserialize, draw, getBounds, getNodeType, getOpaqueRect, ref, serialize, unref, writeToFile
Methods inherited from class org.gnome.gobject.TypeInstance
callParent, callParent, getMemoryLayout, getPrivate, readGClass, writeGClass
Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
TextureScaleNode
Create a TextureScaleNode proxy 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
-
-
Method Details
-
getType
-
asParent
Returns this instance as if it were its parent type. This is mostly synonymous to the Javasuper
keyword, but will set the native typeclass function pointers to the parent type. When overriding a native virtual method in Java, "chaining up" withsuper.methodName()
doesn't work, because it invokes the overridden function pointer again. To chain up, callasParent().methodName()
. This will call the native function pointer of this virtual method in the typeclass of the parent type.- Overrides:
asParent
in classRenderNode
-
getFilter
Retrieves theGskScalingFilter
used when creating thisGskRenderNode
.- Returns:
- the
GskScalingFilter
-
getTexture
Retrieves theGdkTexture
used when creating thisGskRenderNode
.- Returns:
- the
GdkTexture
-