Package org.lwjgl.stb

Class STBTTKerningentry

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class STBTTKerningentry extends Struct<STBTTKerningentry> implements NativeResource

 struct stbtt_kerningentry {
     int glyph1;
     int glyph2;
     int advance;
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • GLYPH1

      public static final int GLYPH1
      The struct member offsets.
    • GLYPH2

      public static final int GLYPH2
      The struct member offsets.
    • ADVANCE

      public static final int ADVANCE
      The struct member offsets.
  • Constructor Details

    • STBTTKerningentry

      public STBTTKerningentry(ByteBuffer container)
      Creates a STBTTKerningentry instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

      The created instance holds a strong reference to the container object.

  • Method Details

    • sizeof

      public int sizeof()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<STBTTKerningentry>
    • glyph1

      public int glyph1()
      Returns:
      the value of the glyph1 field.
    • glyph2

      public int glyph2()
      Returns:
      the value of the glyph2 field.
    • advance

      public int advance()
      Returns:
      the value of the advance field.
    • malloc

      public static STBTTKerningentry malloc()
      Returns a new STBTTKerningentry instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static STBTTKerningentry calloc()
      Returns a new STBTTKerningentry instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static STBTTKerningentry create()
      Returns a new STBTTKerningentry instance allocated with BufferUtils.
    • create

      public static STBTTKerningentry create(long address)
      Returns a new STBTTKerningentry instance for the specified memory address.
    • createSafe

      public static @Nullable STBTTKerningentry createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static STBTTKerningentry.Buffer malloc(int capacity)
      Returns a new STBTTKerningentry.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static STBTTKerningentry.Buffer calloc(int capacity)
      Returns a new STBTTKerningentry.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static STBTTKerningentry.Buffer create(int capacity)
      Returns a new STBTTKerningentry.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static STBTTKerningentry.Buffer create(long address, int capacity)
      Create a STBTTKerningentry.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable STBTTKerningentry.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • malloc

      public static STBTTKerningentry malloc(MemoryStack stack)
      Returns a new STBTTKerningentry instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static STBTTKerningentry calloc(MemoryStack stack)
      Returns a new STBTTKerningentry instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static STBTTKerningentry.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new STBTTKerningentry.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static STBTTKerningentry.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new STBTTKerningentry.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • nglyph1

      public static int nglyph1(long struct)
      Unsafe version of glyph1().
    • nglyph2

      public static int nglyph2(long struct)
      Unsafe version of glyph2().
    • nadvance

      public static int nadvance(long struct)
      Unsafe version of advance().