Class spng_trns.Buffer

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

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

    • Buffer

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

    • gray

      public short gray()
      Returns:
      the value of the gray field.
    • red

      public short red()
      Returns:
      the value of the red field.
    • green

      public short green()
      Returns:
      the value of the green field.
    • blue

      public short blue()
      Returns:
      the value of the blue field.
    • n_type3_entries

      public int n_type3_entries()
      Returns:
      the value of the n_type3_entries field.
    • type3_alpha

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

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

      public spng_trns.Buffer gray(short value)
      Sets the specified value to the gray field.
    • red

      public spng_trns.Buffer red(short value)
      Sets the specified value to the red field.
    • green

      public spng_trns.Buffer green(short value)
      Sets the specified value to the green field.
    • blue

      public spng_trns.Buffer blue(short value)
      Sets the specified value to the blue field.
    • type3_alpha

      public spng_trns.Buffer type3_alpha(ByteBuffer value)
      Copies the specified ByteBuffer to the type3_alpha field.
    • type3_alpha

      public spng_trns.Buffer type3_alpha(int index, byte value)
      Sets the specified value at the specified index of the type3_alpha field.