Class NkBakedFont.Buffer

All Implemented Interfaces:
AutoCloseable, Iterable<NkBakedFont>, NativeResource, Pointer
Enclosing class:
NkBakedFont

public static class NkBakedFont.Buffer extends StructBuffer<NkBakedFont,NkBakedFont.Buffer> implements NativeResource
An array of NkBakedFont structs.
  • Constructor Details

    • Buffer

      public Buffer(ByteBuffer container)
      Creates a new NkBakedFont.Buffer instance backed by the specified container.

      Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided by NkBakedFont.SIZEOF, and its mark will be undefined.

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

    • Buffer

      public Buffer(long address, int cap)
  • Method Details

    • height

      public float height()
      Returns:
      the value of the height field.
    • ascent

      public float ascent()
      Returns:
      the value of the ascent field.
    • descent

      public float descent()
      Returns:
      the value of the descent field.
    • glyph_offset

      public int glyph_offset()
      Returns:
      the value of the glyph_offset field.
    • glyph_count

      public int glyph_count()
      Returns:
      the value of the glyph_count field.
    • ranges

      public @Nullable IntBuffer ranges(int capacity)
      Returns:
      a IntBuffer view of the data pointed to by the ranges field.
    • height

      public NkBakedFont.Buffer height(float value)
      Sets the specified value to the height field.
    • ascent

      public NkBakedFont.Buffer ascent(float value)
      Sets the specified value to the ascent field.
    • descent

      public NkBakedFont.Buffer descent(float value)
      Sets the specified value to the descent field.
    • glyph_offset

      public NkBakedFont.Buffer glyph_offset(int value)
      Sets the specified value to the glyph_offset field.
    • glyph_count

      public NkBakedFont.Buffer glyph_count(int value)
      Sets the specified value to the glyph_count field.
    • ranges

      public NkBakedFont.Buffer ranges(@Nullable IntBuffer value)
      Sets the address of the specified IntBuffer to the ranges field.