Class Variation

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

@Generated("org.javagi.JavaGI") public class Variation extends ProxyInstance
Data type for holding variation data. Registered OpenType variation-axis tags are listed in OpenType Axis Tag Registry.
Since:
1.4.2
  • Constructor Details

    • Variation

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

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

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

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

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

    • getMemoryLayout

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

      public Tag readTag()
      Read the value of the field tag.
      Returns:
      The value of the field tag
    • writeTag

      public void writeTag(Tag tag)
      Write a value in the field tag.
      Parameters:
      tag - The new value for the field tag
    • readValue

      public float readValue()
      Read the value of the field value.
      Returns:
      The value of the field value
    • writeValue

      public void writeValue(float value)
      Write a value in the field value.
      Parameters:
      value - The new value for the field value
    • variationToString

      public void variationToString(@Nullable Out<String[]> buf)

      Converts an hb_variation_t into a NULL-terminated string in the format understood by hb_variation_from_string(). The client in responsible for allocating big enough size for buf, 128 bytes is more than enough.

      Note that the string won't include any whitespace.

      Parameters:
      buf - output string
      Since:
      1.4.2