Class GlyphPosition

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

@Generated("org.javagi.JavaGI") public class GlyphPosition extends ProxyInstance
The hb_glyph_position_t is the structure that holds the positions of the glyph in both horizontal and vertical directions. All positions in hb_glyph_position_t are relative to the current point.
  • Constructor Details

    • GlyphPosition

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

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

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

      public GlyphPosition(Position xAdvance, Position yAdvance, Position xOffset, Position yOffset, VarInt var, Arena arena)
      Allocate a new GlyphPosition with the fields set to the provided values.
      Parameters:
      xAdvance - value for the field xAdvance
      yAdvance - value for the field yAdvance
      xOffset - value for the field xOffset
      yOffset - value for the field yOffset
      var - value for the field var
      arena - to control the memory allocation scope
    • GlyphPosition

      public GlyphPosition(Position xAdvance, Position yAdvance, Position xOffset, Position yOffset, VarInt var)
      Allocate a new GlyphPosition with the fields set to the provided values. The memory is allocated with Arena.ofAuto().
      Parameters:
      xAdvance - value for the field xAdvance
      yAdvance - value for the field yAdvance
      xOffset - value for the field xOffset
      yOffset - value for the field yOffset
      var - value for the field var
  • Method Details

    • getType

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

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

      public Position readXAdvance()
      Read the value of the field x_advance.
      Returns:
      The value of the field x_advance
    • writeXAdvance

      public void writeXAdvance(Position xAdvance)
      Write a value in the field x_advance.
      Parameters:
      xAdvance - The new value for the field x_advance
    • readYAdvance

      public Position readYAdvance()
      Read the value of the field y_advance.
      Returns:
      The value of the field y_advance
    • writeYAdvance

      public void writeYAdvance(Position yAdvance)
      Write a value in the field y_advance.
      Parameters:
      yAdvance - The new value for the field y_advance
    • readXOffset

      public Position readXOffset()
      Read the value of the field x_offset.
      Returns:
      The value of the field x_offset
    • writeXOffset

      public void writeXOffset(Position xOffset)
      Write a value in the field x_offset.
      Parameters:
      xOffset - The new value for the field x_offset
    • readYOffset

      public Position readYOffset()
      Read the value of the field y_offset.
      Returns:
      The value of the field y_offset
    • writeYOffset

      public void writeYOffset(Position yOffset)
      Write a value in the field y_offset.
      Parameters:
      yOffset - The new value for the field y_offset
    • readVar

      public @Nullable VarInt readVar()
      Read the value of the field var.
      Returns:
      The value of the field var
    • writeVar

      public void writeVar(@Nullable VarInt var)
      Write a value in the field var.
      Parameters:
      var - The new value for the field var