Class spng_chrm_int

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class spng_chrm_int extends Struct<spng_chrm_int> implements NativeResource

 struct spng_chrm_int {
     uint32_t white_point_x;
     uint32_t white_point_y;
     uint32_t red_x;
     uint32_t red_y;
     uint32_t green_x;
     uint32_t green_y;
     uint32_t blue_x;
     uint32_t blue_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.
    • WHITE_POINT_X

      public static final int WHITE_POINT_X
      The struct member offsets.
    • WHITE_POINT_Y

      public static final int WHITE_POINT_Y
      The struct member offsets.
    • RED_X

      public static final int RED_X
      The struct member offsets.
    • RED_Y

      public static final int RED_Y
      The struct member offsets.
    • GREEN_X

      public static final int GREEN_X
      The struct member offsets.
    • GREEN_Y

      public static final int GREEN_Y
      The struct member offsets.
    • BLUE_X

      public static final int BLUE_X
      The struct member offsets.
    • BLUE_Y

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

    • spng_chrm_int

      public spng_chrm_int(ByteBuffer container)
      Creates a spng_chrm_int 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_chrm_int>
    • white_point_x

      public int white_point_x()
      Returns:
      the value of the white_point_x field.
    • white_point_y

      public int white_point_y()
      Returns:
      the value of the white_point_y field.
    • red_x

      public int red_x()
      Returns:
      the value of the red_x field.
    • red_y

      public int red_y()
      Returns:
      the value of the red_y field.
    • green_x

      public int green_x()
      Returns:
      the value of the green_x field.
    • green_y

      public int green_y()
      Returns:
      the value of the green_y field.
    • blue_x

      public int blue_x()
      Returns:
      the value of the blue_x field.
    • blue_y

      public int blue_y()
      Returns:
      the value of the blue_y field.
    • white_point_x

      public spng_chrm_int white_point_x(int value)
      Sets the specified value to the white_point_x field.
    • white_point_y

      public spng_chrm_int white_point_y(int value)
      Sets the specified value to the white_point_y field.
    • red_x

      public spng_chrm_int red_x(int value)
      Sets the specified value to the red_x field.
    • red_y

      public spng_chrm_int red_y(int value)
      Sets the specified value to the red_y field.
    • green_x

      public spng_chrm_int green_x(int value)
      Sets the specified value to the green_x field.
    • green_y

      public spng_chrm_int green_y(int value)
      Sets the specified value to the green_y field.
    • blue_x

      public spng_chrm_int blue_x(int value)
      Sets the specified value to the blue_x field.
    • blue_y

      public spng_chrm_int blue_y(int value)
      Sets the specified value to the blue_y field.
    • set

      public spng_chrm_int set(int white_point_x, int white_point_y, int red_x, int red_y, int green_x, int green_y, int blue_x, int blue_y)
      Initializes this struct with the specified values.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

      public static spng_chrm_int calloc(MemoryStack stack)
      Returns a new spng_chrm_int 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_chrm_int.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new spng_chrm_int.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

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

      public static int nwhite_point_x(long struct)
      Unsafe version of white_point_x().
    • nwhite_point_y

      public static int nwhite_point_y(long struct)
      Unsafe version of white_point_y().
    • nred_x

      public static int nred_x(long struct)
      Unsafe version of red_x().
    • nred_y

      public static int nred_y(long struct)
      Unsafe version of red_y().
    • ngreen_x

      public static int ngreen_x(long struct)
      Unsafe version of green_x().
    • ngreen_y

      public static int ngreen_y(long struct)
      Unsafe version of green_y().
    • nblue_x

      public static int nblue_x(long struct)
      Unsafe version of blue_x().
    • nblue_y

      public static int nblue_y(long struct)
      Unsafe version of blue_y().
    • nwhite_point_x

      public static void nwhite_point_x(long struct, int value)
      Unsafe version of white_point_x.
    • nwhite_point_y

      public static void nwhite_point_y(long struct, int value)
      Unsafe version of white_point_y.
    • nred_x

      public static void nred_x(long struct, int value)
      Unsafe version of red_x.
    • nred_y

      public static void nred_y(long struct, int value)
      Unsafe version of red_y.
    • ngreen_x

      public static void ngreen_x(long struct, int value)
      Unsafe version of green_x.
    • ngreen_y

      public static void ngreen_y(long struct, int value)
      Unsafe version of green_y.
    • nblue_x

      public static void nblue_x(long struct, int value)
      Unsafe version of blue_x.
    • nblue_y

      public static void nblue_y(long struct, int value)
      Unsafe version of blue_y.