Class ColorStop

java.lang.Object
org.javagi.base.ProxyInstance
org.freedesktop.harfbuzz.ColorStop
All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class ColorStop extends ProxyInstance

Information about a color stop on a color line.

Color lines typically have offsets ranging between 0 and 1, but that is not required.

Note: despite color being unpremultiplied here, interpolation in gradients shall happen in premultiplied space. See the OpenType spec COLR section for details.

Since:
7.0.0
  • 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, Bool isForeground, Color color, Arena arena)
      Allocate a new ColorStop with the fields set to the provided values.
      Parameters:
      offset - value for the field offset
      isForeground - value for the field isForeground
      color - value for the field color
      arena - to control the memory allocation scope
    • ColorStop

      public ColorStop(float offset, Bool isForeground, Color 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
      isForeground - value for the field isForeground
      color - value for the field color
  • Method Details

    • getType

      public static @Nullable Type getType()
      Get the GType of the ColorStop class.
      Returns:
      the GType
    • 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
    • readIsForeground

      public Bool readIsForeground()
      Read the value of the field is_foreground.
      Returns:
      The value of the field is_foreground
    • writeIsForeground

      public void writeIsForeground(Bool isForeground)
      Write a value in the field is_foreground.
      Parameters:
      isForeground - The new value for the field is_foreground
    • readColor

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

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