Class BorderNode
java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.gobject.TypeInstance
org.gnome.gsk.RenderNode
org.gnome.gsk.BorderNode
- All Implemented Interfaces:
Proxy
A render node for a border.
-
Nested Class Summary
Nested classes/interfaces inherited from class RenderNode
RenderNode.RenderNode$Impl -
Constructor Summary
ConstructorsConstructorDescriptionBorderNode(MemorySegment address) Create a BorderNode instance for the provided memory address.BorderNode(RoundedRect outline, @Nullable float @Nullable [] borderWidth, @Nullable RGBA @Nullable [] borderColor) Creates aGskRenderNodethat will stroke a border rectangle inside the givenoutline. -
Method Summary
Modifier and TypeMethodDescriptionprotected BorderNodeasParent()Return this instance as if it were its parent type.RGBA[]Retrieves the colors of the border.static MemoryLayoutThe memory layout of the native struct.Retrieves the outline of the border.static @Nullable TypegetType()Get the GType of the BorderNode class.float[]Retrieves the stroke widths of the border.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
-
BorderNode
Create a BorderNode instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
BorderNode
public BorderNode(RoundedRect outline, @Nullable float @Nullable [] borderWidth, @Nullable RGBA @Nullable [] borderColor) Creates a
GskRenderNodethat will stroke a border rectangle inside the givenoutline.The 4 sides of the border can have different widths and colors.
- Parameters:
outline- aGskRoundedRectdescribing the outline of the borderborderWidth- the stroke width of the border on the top, right, bottom and left side respectively.borderColor- the color used on the top, right, bottom and left side.- Throws:
IllegalArgumentException- when length ofborderWidthis less than 4IllegalArgumentException- when length ofborderColoris less than 4
-
-
Method Details
-
getType
-
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
-
getColors
Retrieves the colors of the border.- Returns:
- an array of 4
GdkRGBAstructs for the top, right, bottom and left color of the border
-
getOutline
Retrieves the outline of the border.- Returns:
- the outline of the border
-
getWidths
public float[] getWidths()Retrieves the stroke widths of the border.- Returns:
- an array of 4 floats for the top, right, bottom and left stroke width of the border, respectively
-