Class ExrWriteChannelInfo

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class ExrWriteChannelInfo extends Struct<ExrWriteChannelInfo> implements NativeResource
struct ExrWriteChannelInfo {
    char const * name;
    uint32_t pixel_type;
    int32_t x_sampling;
    int32_t y_sampling;
    uint8_t p_linear;
}
  • Field Details

    • SIZEOF

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

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

      public static final int NAME
      The struct member offsets.
    • PIXEL_TYPE

      public static final int PIXEL_TYPE
      The struct member offsets.
    • X_SAMPLING

      public static final int X_SAMPLING
      The struct member offsets.
    • Y_SAMPLING

      public static final int Y_SAMPLING
      The struct member offsets.
    • P_LINEAR

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

    • ExrWriteChannelInfo

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

      @NativeType("char const *") public ByteBuffer name()
      Returns:
      a ByteBuffer view of the null-terminated string pointed to by the name field.
    • nameString

      @NativeType("char const *") public String nameString()
      Returns:
      the null-terminated string pointed to by the name field.
    • pixel_type

      @NativeType("uint32_t") public int pixel_type()
      Returns:
      the value of the pixel_type field.
    • x_sampling

      @NativeType("int32_t") public int x_sampling()
      Returns:
      the value of the x_sampling field.
    • y_sampling

      @NativeType("int32_t") public int y_sampling()
      Returns:
      the value of the y_sampling field.
    • p_linear

      @NativeType("uint8_t") public byte p_linear()
      Returns:
      the value of the p_linear field.
    • name

      public ExrWriteChannelInfo name(@NativeType("char const *") ByteBuffer value)
      Sets the address of the specified encoded string to the name field.
    • pixel_type

      public ExrWriteChannelInfo pixel_type(@NativeType("uint32_t") int value)
      Sets the specified value to the pixel_type field.
    • x_sampling

      public ExrWriteChannelInfo x_sampling(@NativeType("int32_t") int value)
      Sets the specified value to the x_sampling field.
    • y_sampling

      public ExrWriteChannelInfo y_sampling(@NativeType("int32_t") int value)
      Sets the specified value to the y_sampling field.
    • p_linear

      public ExrWriteChannelInfo p_linear(@NativeType("uint8_t") byte value)
      Sets the specified value to the p_linear field.
    • set

      public ExrWriteChannelInfo set(ByteBuffer name, int pixel_type, int x_sampling, int y_sampling, byte p_linear)
      Initializes this struct with the specified values.
    • set

      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static ByteBuffer nname(long struct)
      Unsafe version of name().
    • nnameString

      public static String nnameString(long struct)
      Unsafe version of nameString().
    • npixel_type

      public static int npixel_type(long struct)
      Unsafe version of pixel_type().
    • nx_sampling

      public static int nx_sampling(long struct)
      Unsafe version of x_sampling().
    • ny_sampling

      public static int ny_sampling(long struct)
      Unsafe version of y_sampling().
    • np_linear

      public static byte np_linear(long struct)
      Unsafe version of p_linear().
    • nname

      public static void nname(long struct, ByteBuffer value)
      Unsafe version of name.
    • npixel_type

      public static void npixel_type(long struct, int value)
      Unsafe version of pixel_type.
    • nx_sampling

      public static void nx_sampling(long struct, int value)
      Unsafe version of x_sampling.
    • ny_sampling

      public static void ny_sampling(long struct, int value)
      Unsafe version of y_sampling.
    • np_linear

      public static void np_linear(long struct, byte value)
      Unsafe version of p_linear.
    • validate

      public static void validate(long struct)
      Validates pointer members that should not be NULL.
      Parameters:
      struct - the struct to validate