Class hb_color_stop_t

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class hb_color_stop_t extends Struct<hb_color_stop_t> implements NativeResource

 struct hb_color_stop_t {
     float offset;
     hb_bool_t is_foreground;
     hb_color_t color;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int OFFSET
      The struct member offsets.
    • IS_FOREGROUND

      public static final int IS_FOREGROUND
      The struct member offsets.
    • COLOR

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

    • hb_color_stop_t

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

      public float offset()
      Returns:
      the value of the offset field.
    • is_foreground

      public boolean is_foreground()
      Returns:
      the value of the is_foreground field.
    • color

      public int color()
      Returns:
      the value of the color field.
    • offset

      public hb_color_stop_t offset(float value)
      Sets the specified value to the offset field.
    • is_foreground

      public hb_color_stop_t is_foreground(boolean value)
      Sets the specified value to the is_foreground field.
    • color

      public hb_color_stop_t color(int value)
      Sets the specified value to the color field.
    • set

      public hb_color_stop_t set(float offset, boolean is_foreground, int color)
      Initializes this struct with the specified values.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static float noffset(long struct)
      Unsafe version of offset().
    • nis_foreground

      public static int nis_foreground(long struct)
      Unsafe version of is_foreground().
    • ncolor

      public static int ncolor(long struct)
      Unsafe version of color().
    • noffset

      public static void noffset(long struct, float value)
      Unsafe version of offset.
    • nis_foreground

      public static void nis_foreground(long struct, int value)
      Unsafe version of is_foreground.
    • ncolor

      public static void ncolor(long struct, int value)
      Unsafe version of color.