Class NkFontConfig.Buffer

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

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

    • Buffer

      public Buffer(ByteBuffer container)
      Creates a new NkFontConfig.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 NkFontConfig.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

    • next

      public @Nullable NkFontConfig next()
      Returns:
      a NkFontConfig view of the struct pointed to by the next field.
    • ttf_blob

      public @Nullable ByteBuffer ttf_blob()
      Returns:
      a ByteBuffer view of the data pointed to by the ttf_blob field.
    • ttf_size

      public long ttf_size()
      Returns:
      the value of the ttf_size field.
    • ttf_data_owned_by_atlas

      public boolean ttf_data_owned_by_atlas()
      Returns:
      the value of the ttf_data_owned_by_atlas field.
    • merge_mode

      public boolean merge_mode()
      Returns:
      the value of the merge_mode field.
    • pixel_snap

      public boolean pixel_snap()
      Returns:
      the value of the pixel_snap field.
    • oversample_v

      public boolean oversample_v()
      Returns:
      the value of the oversample_v field.
    • oversample_h

      public boolean oversample_h()
      Returns:
      the value of the oversample_h field.
    • padding

      public ByteBuffer padding()
      Returns:
      a ByteBuffer view of the padding field.
    • padding

      public byte padding(int index)
      Returns:
      the value at the specified index of the padding field.
    • size

      public float size()
      Returns:
      the value of the size field.
    • coord_type

      public int coord_type()
      Returns:
      the value of the coord_type field.
    • spacing

      public NkVec2 spacing()
      Returns:
      a NkVec2 view of the spacing field.
    • range

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

      public @Nullable NkBakedFont font()
      Returns:
      a NkBakedFont view of the struct pointed to by the font field.
    • fallback_glyph

      public int fallback_glyph()
      Returns:
      the value of the fallback_glyph field.
    • n

      public @Nullable NkFontConfig n()
      Returns:
      a NkFontConfig view of the struct pointed to by the n field.
    • p

      public @Nullable NkFontConfig p()
      Returns:
      a NkFontConfig view of the struct pointed to by the p field.
    • next

      public NkFontConfig.Buffer next(@Nullable NkFontConfig value)
      Sets the address of the specified NkFontConfig to the next field.
    • ttf_blob

      public NkFontConfig.Buffer ttf_blob(@Nullable ByteBuffer value)
      Sets the address of the specified ByteBuffer to the ttf_blob field.
    • ttf_size

      public NkFontConfig.Buffer ttf_size(long value)
      Sets the specified value to the ttf_size field.
    • ttf_data_owned_by_atlas

      public NkFontConfig.Buffer ttf_data_owned_by_atlas(boolean value)
      Sets the specified value to the ttf_data_owned_by_atlas field.
    • merge_mode

      public NkFontConfig.Buffer merge_mode(boolean value)
      Sets the specified value to the merge_mode field.
    • pixel_snap

      public NkFontConfig.Buffer pixel_snap(boolean value)
      Sets the specified value to the pixel_snap field.
    • oversample_v

      public NkFontConfig.Buffer oversample_v(boolean value)
      Sets the specified value to the oversample_v field.
    • oversample_h

      public NkFontConfig.Buffer oversample_h(boolean value)
      Sets the specified value to the oversample_h field.
    • padding

      public NkFontConfig.Buffer padding(ByteBuffer value)
      Copies the specified ByteBuffer to the padding field.
    • padding

      public NkFontConfig.Buffer padding(int index, byte value)
      Sets the specified value at the specified index of the padding field.
    • size

      public NkFontConfig.Buffer size(float value)
      Sets the specified value to the size field.
    • coord_type

      public NkFontConfig.Buffer coord_type(int value)
      Sets the specified value to the coord_type field.
    • spacing

      public NkFontConfig.Buffer spacing(NkVec2 value)
      Copies the specified NkVec2 to the spacing field.
    • spacing

      public NkFontConfig.Buffer spacing(Consumer<NkVec2> consumer)
      Passes the spacing field to the specified Consumer.
    • range

      public NkFontConfig.Buffer range(@Nullable IntBuffer value)
      Sets the address of the specified IntBuffer to the range field.
    • font

      public NkFontConfig.Buffer font(@Nullable NkBakedFont value)
      Sets the address of the specified NkBakedFont to the font field.
    • fallback_glyph

      public NkFontConfig.Buffer fallback_glyph(int value)
      Sets the specified value to the fallback_glyph field.
    • n

      public NkFontConfig.Buffer n(@Nullable NkFontConfig value)
      Sets the address of the specified NkFontConfig to the n field.
    • p

      public NkFontConfig.Buffer p(@Nullable NkFontConfig value)
      Sets the address of the specified NkFontConfig to the p field.