Class ColorStop

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class ColorStop extends ProxyInstance
A color stop in a gradient node.
  • Constructor Details

    • ColorStop

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

      public ColorStop(Arena arena)
      Allocate a new ColorStop.
      Parameters:
      arena - to control the memory allocation scope
    • ColorStop

      public ColorStop()
      Allocate a new ColorStop. The memory is allocated with Arena.ofAuto().
    • ColorStop

      public ColorStop(float offset, RGBA color, Arena arena)
      Allocate a new ColorStop with the fields set to the provided values.
      Parameters:
      offset - value for the field offset
      color - value for the field color
      arena - to control the memory allocation scope
    • ColorStop

      public ColorStop(float offset, RGBA color)
      Allocate a new ColorStop with the fields set to the provided values. The memory is allocated with Arena.ofAuto().
      Parameters:
      offset - value for the field offset
      color - value for the field color
  • Method Details

    • getMemoryLayout

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

      public float readOffset()
      Read the value of the field offset.
      Returns:
      The value of the field offset
    • writeOffset

      public void writeOffset(float offset)
      Write a value in the field offset.
      Parameters:
      offset - The new value for the field offset
    • readColor

      public @Nullable RGBA readColor()
      Read the value of the field color.
      Returns:
      The value of the field color
    • writeColor

      public void writeColor(@Nullable RGBA color)
      Write a value in the field color.
      Parameters:
      color - The new value for the field color