Class EXRBox2i

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class EXRBox2i extends Struct<EXRBox2i> implements NativeResource

 struct EXRBox2i {
     int min_x;
     int min_y;
     int max_x;
     int max_y;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int MIN_X
      The struct member offsets.
    • MIN_Y

      public static final int MIN_Y
      The struct member offsets.
    • MAX_X

      public static final int MAX_X
      The struct member offsets.
    • MAX_Y

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

    • EXRBox2i

      public EXRBox2i(ByteBuffer container)
      Creates a EXRBox2i 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<EXRBox2i>
    • min_x

      public int min_x()
      Returns:
      the value of the min_x field.
    • min_y

      public int min_y()
      Returns:
      the value of the min_y field.
    • max_x

      public int max_x()
      Returns:
      the value of the max_x field.
    • max_y

      public int max_y()
      Returns:
      the value of the max_y field.
    • min_x

      public EXRBox2i min_x(int value)
      Sets the specified value to the min_x field.
    • min_y

      public EXRBox2i min_y(int value)
      Sets the specified value to the min_y field.
    • max_x

      public EXRBox2i max_x(int value)
      Sets the specified value to the max_x field.
    • max_y

      public EXRBox2i max_y(int value)
      Sets the specified value to the max_y field.
    • set

      public EXRBox2i set(int min_x, int min_y, int max_x, int max_y)
      Initializes this struct with the specified values.
    • set

      public EXRBox2i set(EXRBox2i src)
      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static EXRBox2i.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new EXRBox2i.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
    • nmin_x

      public static int nmin_x(long struct)
      Unsafe version of min_x().
    • nmin_y

      public static int nmin_y(long struct)
      Unsafe version of min_y().
    • nmax_x

      public static int nmax_x(long struct)
      Unsafe version of max_x().
    • nmax_y

      public static int nmax_y(long struct)
      Unsafe version of max_y().
    • nmin_x

      public static void nmin_x(long struct, int value)
      Unsafe version of min_x.
    • nmin_y

      public static void nmin_y(long struct, int value)
      Unsafe version of min_y.
    • nmax_x

      public static void nmax_x(long struct, int value)
      Unsafe version of max_x.
    • nmax_y

      public static void nmax_y(long struct, int value)
      Unsafe version of max_y.