Class spng_chrm

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class spng_chrm extends Struct<spng_chrm> implements NativeResource

 struct spng_chrm {
     double white_point_x;
     double white_point_y;
     double red_x;
     double red_y;
     double green_x;
     double green_y;
     double blue_x;
     double 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

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

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

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

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

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

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

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

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

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

      public spng_chrm white_point_x(double value)
      Sets the specified value to the white_point_x field.
    • white_point_y

      public spng_chrm white_point_y(double value)
      Sets the specified value to the white_point_y field.
    • red_x

      public spng_chrm red_x(double value)
      Sets the specified value to the red_x field.
    • red_y

      public spng_chrm red_y(double value)
      Sets the specified value to the red_y field.
    • green_x

      public spng_chrm green_x(double value)
      Sets the specified value to the green_x field.
    • green_y

      public spng_chrm green_y(double value)
      Sets the specified value to the green_y field.
    • blue_x

      public spng_chrm blue_x(double value)
      Sets the specified value to the blue_x field.
    • blue_y

      public spng_chrm blue_y(double value)
      Sets the specified value to the blue_y field.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static spng_chrm.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new spng_chrm.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 double nwhite_point_x(long struct)
      Unsafe version of white_point_x().
    • nwhite_point_y

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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