Class ColorNode

All Implemented Interfaces:
Proxy

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

    • ColorNode

      public ColorNode(MemorySegment address)
      Create a ColorNode instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • ColorNode

      public ColorNode(RGBA rgba, Rect bounds)
      Creates a GskRenderNode that will render the color specified by rgba into the area given by bounds.
      Parameters:
      rgba - a GdkRGBA specifying a color
      bounds - the rectangle to render the color into
  • Method Details

    • getType

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

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

      protected ColorNode 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
    • getColor

      public RGBA getColor()

      Retrieves the color of the given node.

      The value returned by this function will not be correct if the render node was created for a non-sRGB color.

      Returns:
      the color of the node