Class STBTTPackRange

java.lang.Object
overrungl.struct.GroupType
overrungl.stb.STBTTPackRange
All Implemented Interfaces:
Addressable
Direct Known Subclasses:
STBTTPackRange.Buffer

public sealed class STBTTPackRange extends GroupType permits STBTTPackRange.Buffer

Layout

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

    • LAYOUT

      public static final GroupLayout LAYOUT
      The struct layout of STBTTPackRange.
    • OFFSET_font_size

      public static final long OFFSET_font_size
      The byte offset of font_size.
    • LAYOUT_font_size

      public static final MemoryLayout LAYOUT_font_size
      The memory layout of font_size.
    • VH_font_size

      public static final VarHandle VH_font_size
      The VarHandle of font_size of type (MemorySegment base, long baseOffset, long index)MemorySegment.
    • OFFSET_first_unicode_codepoint_in_range

      public static final long OFFSET_first_unicode_codepoint_in_range
      The byte offset of first_unicode_codepoint_in_range.
    • LAYOUT_first_unicode_codepoint_in_range

      public static final MemoryLayout LAYOUT_first_unicode_codepoint_in_range
      The memory layout of first_unicode_codepoint_in_range.
    • VH_first_unicode_codepoint_in_range

      public static final VarHandle VH_first_unicode_codepoint_in_range
      The VarHandle of first_unicode_codepoint_in_range of type (MemorySegment base, long baseOffset, long index)MemorySegment.
    • OFFSET_array_of_unicode_codepoints

      public static final long OFFSET_array_of_unicode_codepoints
      The byte offset of array_of_unicode_codepoints.
    • LAYOUT_array_of_unicode_codepoints

      public static final MemoryLayout LAYOUT_array_of_unicode_codepoints
      The memory layout of array_of_unicode_codepoints.
    • VH_array_of_unicode_codepoints

      public static final VarHandle VH_array_of_unicode_codepoints
      The VarHandle of array_of_unicode_codepoints of type (MemorySegment base, long baseOffset, long index)MemorySegment.
    • OFFSET_num_chars

      public static final long OFFSET_num_chars
      The byte offset of num_chars.
    • LAYOUT_num_chars

      public static final MemoryLayout LAYOUT_num_chars
      The memory layout of num_chars.
    • VH_num_chars

      public static final VarHandle VH_num_chars
      The VarHandle of num_chars of type (MemorySegment base, long baseOffset, long index)MemorySegment.
    • OFFSET_chardata_for_range

      public static final long OFFSET_chardata_for_range
      The byte offset of chardata_for_range.
    • LAYOUT_chardata_for_range

      public static final MemoryLayout LAYOUT_chardata_for_range
      The memory layout of chardata_for_range.
    • VH_chardata_for_range

      public static final VarHandle VH_chardata_for_range
      The VarHandle of chardata_for_range of type (MemorySegment base, long baseOffset, long index)MemorySegment.
    • OFFSET_h_oversample

      public static final long OFFSET_h_oversample
      The byte offset of h_oversample.
    • LAYOUT_h_oversample

      public static final MemoryLayout LAYOUT_h_oversample
      The memory layout of h_oversample.
    • VH_h_oversample

      public static final VarHandle VH_h_oversample
      The VarHandle of h_oversample of type (MemorySegment base, long baseOffset, long index)MemorySegment.
    • OFFSET_v_oversample

      public static final long OFFSET_v_oversample
      The byte offset of v_oversample.
    • LAYOUT_v_oversample

      public static final MemoryLayout LAYOUT_v_oversample
      The memory layout of v_oversample.
    • VH_v_oversample

      public static final VarHandle VH_v_oversample
      The VarHandle of v_oversample of type (MemorySegment base, long baseOffset, long index)MemorySegment.
  • Constructor Details

    • STBTTPackRange

      public STBTTPackRange(MemorySegment segment)
      Creates STBTTPackRange with the given segment.
      Parameters:
      segment - the memory segment
  • Method Details

    • of

      public static STBTTPackRange.Buffer of(MemorySegment segment)
      Creates STBTTPackRange with the given segment.
      Parameters:
      segment - the memory segment
      Returns:
      the created instance or null if the segment is NULL
    • ofNative

      public static STBTTPackRange ofNative(MemorySegment segment)

      Creates STBTTPackRange with the given segment.

      Reinterprets the segment if zero-length.

      Parameters:
      segment - the memory segment
      Returns:
      the created instance or null if the segment is NULL
    • ofNative

      public static STBTTPackRange.Buffer ofNative(MemorySegment segment, long count)

      Creates STBTTPackRange with the given segment.

      Reinterprets the segment if zero-length.

      Parameters:
      segment - the memory segment
      count - the count of the buffer
      Returns:
      the created instance or null if the segment is NULL
    • alloc

      public static STBTTPackRange alloc(SegmentAllocator allocator)
      Allocates a STBTTPackRange with the given segment allocator.
      Parameters:
      allocator - the segment allocator
      Returns:
      the allocated STBTTPackRange
    • alloc

      public static STBTTPackRange.Buffer alloc(SegmentAllocator allocator, long count)
      Allocates a STBTTPackRange with the given segment allocator and count.
      Parameters:
      allocator - the segment allocator
      count - the count
      Returns:
      the allocated STBTTPackRange
    • copyFrom

      public STBTTPackRange copyFrom(STBTTPackRange src)
      Copies from the given source.
      Parameters:
      src - the source
      Returns:
      this
    • asBuffer

      public STBTTPackRange.Buffer asBuffer()
      Converts this instance to a buffer.
      Returns:
      the buffer
    • font_size

      public static float font_size(MemorySegment segment, long index)
      Returns font_size at the given index.
      Parameters:
      segment - the segment of the struct
      index - the index of the struct buffer
      Returns:
      font_size at the given index
    • font_size

      public float font_size()
      Returns font_size.
      Returns:
      font_size
    • font_size

      public static void font_size(MemorySegment segment, long index, float value)
      Sets font_size with the given value at the given index.
      Parameters:
      segment - the segment of the struct
      index - the index of the struct buffer
      value - the value
    • font_size

      public STBTTPackRange font_size(float value)
      Sets font_size with the given value.
      Parameters:
      value - the value
      Returns:
      this
    • first_unicode_codepoint_in_range

      public static int first_unicode_codepoint_in_range(MemorySegment segment, long index)
      Returns first_unicode_codepoint_in_range at the given index.
      Parameters:
      segment - the segment of the struct
      index - the index of the struct buffer
      Returns:
      first_unicode_codepoint_in_range at the given index
    • first_unicode_codepoint_in_range

      public int first_unicode_codepoint_in_range()
      Returns first_unicode_codepoint_in_range.
      Returns:
      first_unicode_codepoint_in_range
    • first_unicode_codepoint_in_range

      public static void first_unicode_codepoint_in_range(MemorySegment segment, long index, int value)
      Sets first_unicode_codepoint_in_range with the given value at the given index.
      Parameters:
      segment - the segment of the struct
      index - the index of the struct buffer
      value - the value
    • first_unicode_codepoint_in_range

      public STBTTPackRange first_unicode_codepoint_in_range(int value)
      Sets first_unicode_codepoint_in_range with the given value.
      Parameters:
      value - the value
      Returns:
      this
    • array_of_unicode_codepoints

      public static MemorySegment array_of_unicode_codepoints(MemorySegment segment, long index)
      Returns array_of_unicode_codepoints at the given index.
      Parameters:
      segment - the segment of the struct
      index - the index of the struct buffer
      Returns:
      array_of_unicode_codepoints at the given index
    • array_of_unicode_codepoints

      public MemorySegment array_of_unicode_codepoints()
      Returns array_of_unicode_codepoints.
      Returns:
      array_of_unicode_codepoints
    • array_of_unicode_codepoints

      public static void array_of_unicode_codepoints(MemorySegment segment, long index, MemorySegment value)
      Sets array_of_unicode_codepoints with the given value at the given index.
      Parameters:
      segment - the segment of the struct
      index - the index of the struct buffer
      value - the value
    • array_of_unicode_codepoints

      public STBTTPackRange array_of_unicode_codepoints(MemorySegment value)
      Sets array_of_unicode_codepoints with the given value.
      Parameters:
      value - the value
      Returns:
      this
    • num_chars

      public static int num_chars(MemorySegment segment, long index)
      Returns num_chars at the given index.
      Parameters:
      segment - the segment of the struct
      index - the index of the struct buffer
      Returns:
      num_chars at the given index
    • num_chars

      public int num_chars()
      Returns num_chars.
      Returns:
      num_chars
    • num_chars

      public static void num_chars(MemorySegment segment, long index, int value)
      Sets num_chars with the given value at the given index.
      Parameters:
      segment - the segment of the struct
      index - the index of the struct buffer
      value - the value
    • num_chars

      public STBTTPackRange num_chars(int value)
      Sets num_chars with the given value.
      Parameters:
      value - the value
      Returns:
      this
    • chardata_for_range

      public static MemorySegment chardata_for_range(MemorySegment segment, long index)
      Returns chardata_for_range at the given index.
      Parameters:
      segment - the segment of the struct
      index - the index of the struct buffer
      Returns:
      chardata_for_range at the given index
    • chardata_for_range

      public MemorySegment chardata_for_range()
      Returns chardata_for_range.
      Returns:
      chardata_for_range
    • chardata_for_range

      public static void chardata_for_range(MemorySegment segment, long index, MemorySegment value)
      Sets chardata_for_range with the given value at the given index.
      Parameters:
      segment - the segment of the struct
      index - the index of the struct buffer
      value - the value
    • chardata_for_range

      public STBTTPackRange chardata_for_range(MemorySegment value)
      Sets chardata_for_range with the given value.
      Parameters:
      value - the value
      Returns:
      this
    • h_oversample

      public static byte h_oversample(MemorySegment segment, long index)
      Returns h_oversample at the given index.
      Parameters:
      segment - the segment of the struct
      index - the index of the struct buffer
      Returns:
      h_oversample at the given index
    • h_oversample

      public byte h_oversample()
      Returns h_oversample.
      Returns:
      h_oversample
    • h_oversample

      public static void h_oversample(MemorySegment segment, long index, byte value)
      Sets h_oversample with the given value at the given index.
      Parameters:
      segment - the segment of the struct
      index - the index of the struct buffer
      value - the value
    • h_oversample

      public STBTTPackRange h_oversample(byte value)
      Sets h_oversample with the given value.
      Parameters:
      value - the value
      Returns:
      this
    • v_oversample

      public static byte v_oversample(MemorySegment segment, long index)
      Returns v_oversample at the given index.
      Parameters:
      segment - the segment of the struct
      index - the index of the struct buffer
      Returns:
      v_oversample at the given index
    • v_oversample

      public byte v_oversample()
      Returns v_oversample.
      Returns:
      v_oversample
    • v_oversample

      public static void v_oversample(MemorySegment segment, long index, byte value)
      Sets v_oversample with the given value at the given index.
      Parameters:
      segment - the segment of the struct
      index - the index of the struct buffer
      value - the value
    • v_oversample

      public STBTTPackRange v_oversample(byte value)
      Sets v_oversample with the given value.
      Parameters:
      value - the value
      Returns:
      this