Package org.lwjgl.stb

Class STBTTBitmap.Buffer

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

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

    • Buffer

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

    • w

      public int w()
      Returns:
      the value of the w field.
    • h

      public int h()
      Returns:
      the value of the h field.
    • stride

      public int stride()
      Returns:
      the value of the stride field.
    • pixels

      public ByteBuffer pixels(int capacity)
      Returns:
      a ByteBuffer view of the data pointed to by the pixels field.
    • w

      public STBTTBitmap.Buffer w(int value)
      Sets the specified value to the w field.
    • h

      public STBTTBitmap.Buffer h(int value)
      Sets the specified value to the h field.
    • stride

      public STBTTBitmap.Buffer stride(int value)
      Sets the specified value to the stride field.
    • pixels

      public STBTTBitmap.Buffer pixels(ByteBuffer value)
      Sets the address of the specified ByteBuffer to the pixels field.