Class BorderNode

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class BorderNode extends RenderNode
A render node for a border.
  • Constructor Details

    • BorderNode

      public BorderNode(MemorySegment address)
      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 GskRenderNode that will stroke a border rectangle inside the given outline.

      The 4 sides of the border can have different widths and colors.

      Parameters:
      outline - a GskRoundedRect describing the outline of the border
      borderWidth - 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 of borderWidth is less than 4
      IllegalArgumentException - when length of borderColor is less than 4
  • Method Details

    • getType

      public static @Nullable Type getType()
      Get the GType of the BorderNode class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • asParent

      protected BorderNode asParent()
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class RenderNode
      Returns:
      the instance as if it were its parent type
    • getColors

      public RGBA[] getColors()
      Retrieves the colors of the border.
      Returns:
      an array of 4 GdkRGBA structs for the top, right, bottom and left color of the border
    • getOutline

      public RoundedRect 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