Class spng_row_info

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class spng_row_info extends Struct<spng_row_info> implements NativeResource

 struct spng_row_info {
     uint32_t scanline_idx;
     uint32_t row_num;
     int pass;
     uint8_t filter;
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • SCANLINE_IDX

      public static final int SCANLINE_IDX
      The struct member offsets.
    • ROW_NUM

      public static final int ROW_NUM
      The struct member offsets.
    • PASS

      public static final int PASS
      The struct member offsets.
    • FILTER

      public static final int FILTER
      The struct member offsets.
  • Constructor Details

    • spng_row_info

      public spng_row_info(ByteBuffer container)
      Creates a spng_row_info instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

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

  • Method Details

    • sizeof

      public int sizeof()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<spng_row_info>
    • scanline_idx

      public int scanline_idx()
      Returns:
      the value of the scanline_idx field.
    • row_num

      public int row_num()
      Returns:
      the value of the row_num field.
    • pass

      public int pass()
      Returns:
      the value of the pass field.
    • filter

      public byte filter()
      Returns:
      the value of the filter field.
    • malloc

      public static spng_row_info malloc()
      Returns a new spng_row_info instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static spng_row_info calloc()
      Returns a new spng_row_info instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static spng_row_info create()
      Returns a new spng_row_info instance allocated with BufferUtils.
    • create

      public static spng_row_info create(long address)
      Returns a new spng_row_info instance for the specified memory address.
    • createSafe

      public static @Nullable spng_row_info createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static spng_row_info.Buffer malloc(int capacity)
      Returns a new spng_row_info.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static spng_row_info.Buffer calloc(int capacity)
      Returns a new spng_row_info.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static spng_row_info.Buffer create(int capacity)
      Returns a new spng_row_info.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static spng_row_info.Buffer create(long address, int capacity)
      Create a spng_row_info.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable spng_row_info.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • malloc

      public static spng_row_info malloc(MemoryStack stack)
      Returns a new spng_row_info instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static spng_row_info calloc(MemoryStack stack)
      Returns a new spng_row_info instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static spng_row_info.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new spng_row_info.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static spng_row_info.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new spng_row_info.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • nscanline_idx

      public static int nscanline_idx(long struct)
      Unsafe version of scanline_idx().
    • nrow_num

      public static int nrow_num(long struct)
      Unsafe version of row_num().
    • npass

      public static int npass(long struct)
      Unsafe version of pass().
    • nfilter

      public static byte nfilter(long struct)
      Unsafe version of filter().