Class spng_sbit.Buffer

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

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

    • Buffer

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

    • grayscale_bits

      public byte grayscale_bits()
      Returns:
      the value of the grayscale_bits field.
    • red_bits

      public byte red_bits()
      Returns:
      the value of the red_bits field.
    • green_bits

      public byte green_bits()
      Returns:
      the value of the green_bits field.
    • blue_bits

      public byte blue_bits()
      Returns:
      the value of the blue_bits field.
    • alpha_bits

      public byte alpha_bits()
      Returns:
      the value of the alpha_bits field.
    • grayscale_bits

      public spng_sbit.Buffer grayscale_bits(byte value)
      Sets the specified value to the grayscale_bits field.
    • red_bits

      public spng_sbit.Buffer red_bits(byte value)
      Sets the specified value to the red_bits field.
    • green_bits

      public spng_sbit.Buffer green_bits(byte value)
      Sets the specified value to the green_bits field.
    • blue_bits

      public spng_sbit.Buffer blue_bits(byte value)
      Sets the specified value to the blue_bits field.
    • alpha_bits

      public spng_sbit.Buffer alpha_bits(byte value)
      Sets the specified value to the alpha_bits field.