Class ColorMatrixNode

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class ColorMatrixNode extends RenderNode
A render node controlling the color matrix of its single child node.
  • Constructor Details

    • ColorMatrixNode

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

      public ColorMatrixNode(RenderNode child, Matrix colorMatrix, Vec4 colorOffset)

      Creates a GskRenderNode that will drawn the child with colorMatrix.

      In particular, the node will transform colors by applying

      pixel = transpose(color_matrix) * pixel + color_offset
      

      for every pixel. The transformation operates on unpremultiplied colors, with color components ordered R, G, B, A.

      Parameters:
      child - The node to draw
      colorMatrix - The matrix to apply
      colorOffset - Values to add to the color
  • Method Details

    • getType

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

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

      protected ColorMatrixNode 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
    • getChild

      public RenderNode getChild()
      Gets the child node that is getting its colors modified by the given node.
      Returns:
      The child that is getting its colors modified
    • getColorMatrix

      public Matrix getColorMatrix()
      Retrieves the color matrix used by the node.
      Returns:
      a 4x4 color matrix
    • getColorOffset

      public Vec4 getColorOffset()
      Retrieves the color offset used by the node.
      Returns:
      a color vector