Package org.lwjgl.stb

Class STBTTPackRange

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class STBTTPackRange extends Struct<STBTTPackRange> implements NativeResource

 struct stbtt_pack_range {
     float font_size;
     int first_unicode_codepoint_in_range;
     int * array_of_unicode_codepoints;
     int num_chars;
     {@link STBTTPackedchar stbtt_packedchar} * chardata_for_range;
     unsigned char h_oversample;
     unsigned char v_oversample;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int FONT_SIZE
      The struct member offsets.
    • FIRST_UNICODE_CODEPOINT_IN_RANGE

      public static final int FIRST_UNICODE_CODEPOINT_IN_RANGE
      The struct member offsets.
    • ARRAY_OF_UNICODE_CODEPOINTS

      public static final int ARRAY_OF_UNICODE_CODEPOINTS
      The struct member offsets.
    • NUM_CHARS

      public static final int NUM_CHARS
      The struct member offsets.
    • CHARDATA_FOR_RANGE

      public static final int CHARDATA_FOR_RANGE
      The struct member offsets.
    • H_OVERSAMPLE

      public static final int H_OVERSAMPLE
      The struct member offsets.
    • V_OVERSAMPLE

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

    • STBTTPackRange

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

      public float font_size()
      Returns:
      the value of the font_size field.
    • first_unicode_codepoint_in_range

      public int first_unicode_codepoint_in_range()
      Returns:
      the value of the first_unicode_codepoint_in_range field.
    • array_of_unicode_codepoints

      public @Nullable IntBuffer array_of_unicode_codepoints()
      Returns:
      a IntBuffer view of the data pointed to by the array_of_unicode_codepoints field.
    • num_chars

      public int num_chars()
      Returns:
      the value of the num_chars field.
    • chardata_for_range

      public STBTTPackedchar.Buffer chardata_for_range()
      Returns:
      a STBTTPackedchar.Buffer view of the struct array pointed to by the chardata_for_range field.
    • h_oversample

      public byte h_oversample()
      Returns:
      the value of the h_oversample field.
    • v_oversample

      public byte v_oversample()
      Returns:
      the value of the v_oversample field.
    • font_size

      public STBTTPackRange font_size(float value)
      Sets the specified value to the font_size field.
    • first_unicode_codepoint_in_range

      public STBTTPackRange first_unicode_codepoint_in_range(int value)
      Sets the specified value to the first_unicode_codepoint_in_range field.
    • array_of_unicode_codepoints

      public STBTTPackRange array_of_unicode_codepoints(@Nullable IntBuffer value)
      Sets the address of the specified IntBuffer to the array_of_unicode_codepoints field.
    • num_chars

      public STBTTPackRange num_chars(int value)
      Sets the specified value to the num_chars field.
    • chardata_for_range

      public STBTTPackRange chardata_for_range(STBTTPackedchar.Buffer value)
      Sets the address of the specified STBTTPackedchar.Buffer to the chardata_for_range field.
    • h_oversample

      public STBTTPackRange h_oversample(byte value)
      Sets the specified value to the h_oversample field.
    • v_oversample

      public STBTTPackRange v_oversample(byte value)
      Sets the specified value to the v_oversample field.
    • set

      public STBTTPackRange set(float font_size, int first_unicode_codepoint_in_range, @Nullable IntBuffer array_of_unicode_codepoints, int num_chars, STBTTPackedchar.Buffer chardata_for_range, byte h_oversample, byte v_oversample)
      Initializes this struct with the specified values.
    • set

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

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

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

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

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

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

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

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

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

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

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

      @Deprecated public static STBTTPackRange mallocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static STBTTPackRange callocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static STBTTPackRange mallocStack(MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static STBTTPackRange callocStack(MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static STBTTPackRange.Buffer mallocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static STBTTPackRange.Buffer callocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • mallocStack

      @Deprecated public static STBTTPackRange.Buffer mallocStack(int capacity, MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static STBTTPackRange.Buffer callocStack(int capacity, MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • malloc

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

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

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

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

      public static float nfont_size(long struct)
      Unsafe version of font_size().
    • nfirst_unicode_codepoint_in_range

      public static int nfirst_unicode_codepoint_in_range(long struct)
    • narray_of_unicode_codepoints

      public static @Nullable IntBuffer narray_of_unicode_codepoints(long struct)
      Unsafe version of array_of_unicode_codepoints.
    • nnum_chars

      public static int nnum_chars(long struct)
      Unsafe version of num_chars().
    • nchardata_for_range

      public static STBTTPackedchar.Buffer nchardata_for_range(long struct)
      Unsafe version of chardata_for_range().
    • nh_oversample

      public static byte nh_oversample(long struct)
      Unsafe version of h_oversample().
    • nv_oversample

      public static byte nv_oversample(long struct)
      Unsafe version of v_oversample().
    • nfont_size

      public static void nfont_size(long struct, float value)
      Unsafe version of font_size.
    • nfirst_unicode_codepoint_in_range

      public static void nfirst_unicode_codepoint_in_range(long struct, int value)
    • narray_of_unicode_codepoints

      public static void narray_of_unicode_codepoints(long struct, @Nullable IntBuffer value)
      Unsafe version of array_of_unicode_codepoints.
    • nnum_chars

      public static void nnum_chars(long struct, int value)
      Sets the specified value to the num_chars field of the specified struct.
    • nchardata_for_range

      public static void nchardata_for_range(long struct, STBTTPackedchar.Buffer value)
      Unsafe version of chardata_for_range.
    • nh_oversample

      public static void nh_oversample(long struct, byte value)
      Unsafe version of h_oversample.
    • nv_oversample

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

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