Class CompositeNode

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class CompositeNode extends RenderNode
A render node that uses Porter/Duff compositing operators to combine its child with the background.
Since:
4.22
  • Constructor Details

    • CompositeNode

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

      public CompositeNode(RenderNode child, RenderNode mask, PorterDuff op)

      Creates a GskRenderNode that will composite the child onto the background with the given operator wherever the mask is set.

      Note that various operations can modify the background outside of the child's bounds, so the mask may cause visual changes outside of the child.

      Parameters:
      child - The child to composite
      mask - The mask where the compositing will apply
      op - The compositing operator
      Since:
      4.22
  • Method Details

    • getType

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

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

      protected CompositeNode 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 composited by the given node.
      Returns:
      the child GskRenderNode
      Since:
      4.22
    • getMask

      public RenderNode getMask()
      Gets the mask node that describes the region where the compositing applies.
      Returns:
      the mask GskRenderNode
      Since:
      4.22
    • getOperator

      public PorterDuff getOperator()
      Gets the compositing operator used by this node.
      Returns:
      The compositing operator
      Since:
      4.22