Class STBTTPackRange
java.lang.Object
overrungl.struct.GroupType
overrungl.stb.STBTTPackRange
- All Implemented Interfaces:
Addressable
Represents STBTTPackRange.
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final StructLayoutThe struct layout ofSTBTTPackRange.static final MemoryLayoutThe memory layout ofarray_of_unicode_codepoints.static final MemoryLayoutThe memory layout ofchardata_for_range.static final MemoryLayoutThe memory layout offirst_unicode_codepoint_in_range.static final MemoryLayoutThe memory layout offont_size.static final MemoryLayoutThe memory layout ofh_oversample.static final MemoryLayoutThe memory layout ofnum_chars.static final MemoryLayoutThe memory layout ofv_oversample.static final longThe byte offset ofarray_of_unicode_codepoints.static final longThe byte offset ofchardata_for_range.static final longThe byte offset offirst_unicode_codepoint_in_range.static final longThe byte offset offont_size.static final longThe byte offset ofh_oversample.static final longThe byte offset ofnum_chars.static final longThe byte offset ofv_oversample.static final VarHandleTheVarHandleofarray_of_unicode_codepointsof type(MemorySegment base, long baseOffset, long index)MemorySegment.static final VarHandleTheVarHandleofchardata_for_rangeof type(MemorySegment base, long baseOffset, long index)MemorySegment.static final VarHandleTheVarHandleoffirst_unicode_codepoint_in_rangeof type(MemorySegment base, long baseOffset, long index)MemorySegment.static final VarHandlestatic final VarHandleTheVarHandleofh_oversampleof type(MemorySegment base, long baseOffset, long index)MemorySegment.static final VarHandlestatic final VarHandleTheVarHandleofv_oversampleof type(MemorySegment base, long baseOffset, long index)MemorySegment. -
Constructor Summary
ConstructorsConstructorDescriptionSTBTTPackRange(MemorySegment segment, long elementCount) CreatesSTBTTPackRangewith the given segment. -
Method Summary
Modifier and TypeMethodDescriptionstatic STBTTPackRangealloc(SegmentAllocator allocator) Allocates aSTBTTPackRangewith the given segment allocator.static STBTTPackRangealloc(SegmentAllocator allocator, long count) Allocates aSTBTTPackRangewith the given segment allocator and count.Returnsarray_of_unicode_codepoints.Setsarray_of_unicode_codepointswith the given value.static MemorySegmentarray_of_unicode_codepoints(MemorySegment segment, long index) Returnsarray_of_unicode_codepointsat the given index.static voidarray_of_unicode_codepoints(MemorySegment segment, long index, MemorySegment value) Setsarray_of_unicode_codepointswith the given value at the given index.array_of_unicode_codepointsAt(long index) Returnsarray_of_unicode_codepointsat the given index.array_of_unicode_codepointsAt(long index, MemorySegment value) Setsarray_of_unicode_codepointswith the given value at the given index.asSlice(long index) Creates a slice ofSTBTTPackRange.asSlice(long index, long count) Creates a slice ofSTBTTPackRange.at(long index, Consumer<STBTTPackRange> func) VisitsSTBTTPackRangebuffer at the given index.Returnschardata_for_range.chardata_for_range(MemorySegment value) Setschardata_for_rangewith the given value.static MemorySegmentchardata_for_range(MemorySegment segment, long index) Returnschardata_for_rangeat the given index.static voidchardata_for_range(MemorySegment segment, long index, MemorySegment value) Setschardata_for_rangewith the given value at the given index.chardata_for_rangeAt(long index) Returnschardata_for_rangeat the given index.chardata_for_rangeAt(long index, MemorySegment value) Setschardata_for_rangewith the given value at the given index.copyFrom(STBTTPackRange src) Copies from the given source.intReturnsfirst_unicode_codepoint_in_range.first_unicode_codepoint_in_range(int value) Setsfirst_unicode_codepoint_in_rangewith the given value.static intfirst_unicode_codepoint_in_range(MemorySegment segment, long index) Returnsfirst_unicode_codepoint_in_rangeat the given index.static voidfirst_unicode_codepoint_in_range(MemorySegment segment, long index, int value) Setsfirst_unicode_codepoint_in_rangewith the given value at the given index.intfirst_unicode_codepoint_in_rangeAt(long index) Returnsfirst_unicode_codepoint_in_rangeat the given index.first_unicode_codepoint_in_rangeAt(long index, int value) Setsfirst_unicode_codepoint_in_rangewith the given value at the given index.floatReturnsfont_size.font_size(float value) Setsfont_sizewith the given value.static floatfont_size(MemorySegment segment, long index) Returnsfont_sizeat the given index.static voidfont_size(MemorySegment segment, long index, float value) Setsfont_sizewith the given value at the given index.floatfont_sizeAt(long index) Returnsfont_sizeat the given index.font_sizeAt(long index, float value) Setsfont_sizewith the given value at the given index.byteReturnsh_oversample.h_oversample(byte value) Setsh_oversamplewith the given value.static byteh_oversample(MemorySegment segment, long index) Returnsh_oversampleat the given index.static voidh_oversample(MemorySegment segment, long index, byte value) Setsh_oversamplewith the given value at the given index.byteh_oversampleAt(long index) Returnsh_oversampleat the given index.h_oversampleAt(long index, byte value) Setsh_oversamplewith the given value at the given index.intReturnsnum_chars.num_chars(int value) Setsnum_charswith the given value.static intnum_chars(MemorySegment segment, long index) Returnsnum_charsat the given index.static voidnum_chars(MemorySegment segment, long index, int value) Setsnum_charswith the given value at the given index.intnum_charsAt(long index) Returnsnum_charsat the given index.num_charsAt(long index, int value) Setsnum_charswith the given value at the given index.static STBTTPackRangeof(MemorySegment segment) CreatesSTBTTPackRangewith the given segment.static STBTTPackRangeofNative(MemorySegment segment) CreatesSTBTTPackRangewith the given segment.static STBTTPackRangeofNative(MemorySegment segment, long count) CreatesSTBTTPackRangewith the given segment.reinterpret(long count) Reinterprets this buffer with the given count.byteReturnsv_oversample.v_oversample(byte value) Setsv_oversamplewith the given value.static bytev_oversample(MemorySegment segment, long index) Returnsv_oversampleat the given index.static voidv_oversample(MemorySegment segment, long index, byte value) Setsv_oversamplewith the given value at the given index.bytev_oversampleAt(long index) Returnsv_oversampleat the given index.v_oversampleAt(long index, byte value) Setsv_oversamplewith the given value at the given index.Methods inherited from class GroupType
estimateCount, estimateCount, groupLayout, segment
-
Field Details
-
LAYOUT
The struct layout ofSTBTTPackRange. -
OFFSET_font_size
public static final long OFFSET_font_sizeThe byte offset offont_size. -
LAYOUT_font_size
The memory layout offont_size. -
VH_font_size
-
OFFSET_first_unicode_codepoint_in_range
public static final long OFFSET_first_unicode_codepoint_in_rangeThe byte offset offirst_unicode_codepoint_in_range. -
LAYOUT_first_unicode_codepoint_in_range
The memory layout offirst_unicode_codepoint_in_range. -
VH_first_unicode_codepoint_in_range
-
OFFSET_array_of_unicode_codepoints
public static final long OFFSET_array_of_unicode_codepointsThe byte offset ofarray_of_unicode_codepoints. -
LAYOUT_array_of_unicode_codepoints
The memory layout ofarray_of_unicode_codepoints. -
VH_array_of_unicode_codepoints
-
OFFSET_num_chars
public static final long OFFSET_num_charsThe byte offset ofnum_chars. -
LAYOUT_num_chars
The memory layout ofnum_chars. -
VH_num_chars
-
OFFSET_chardata_for_range
public static final long OFFSET_chardata_for_rangeThe byte offset ofchardata_for_range. -
LAYOUT_chardata_for_range
The memory layout ofchardata_for_range. -
VH_chardata_for_range
-
OFFSET_h_oversample
public static final long OFFSET_h_oversampleThe byte offset ofh_oversample. -
LAYOUT_h_oversample
The memory layout ofh_oversample. -
VH_h_oversample
-
OFFSET_v_oversample
public static final long OFFSET_v_oversampleThe byte offset ofv_oversample. -
LAYOUT_v_oversample
The memory layout ofv_oversample. -
VH_v_oversample
-
-
Constructor Details
-
STBTTPackRange
CreatesSTBTTPackRangewith the given segment.- Parameters:
segment- the memory segmentelementCount- the element count of this struct buffer
-
-
Method Details
-
of
CreatesSTBTTPackRangewith the given segment.- Parameters:
segment- the memory segment- Returns:
- the created instance or
nullif the segment isNULL
-
ofNative
Creates
STBTTPackRangewith the given segment.Reinterprets the segment if zero-length.
- Parameters:
segment- the memory segment- Returns:
- the created instance or
nullif the segment isNULL
-
ofNative
Creates
STBTTPackRangewith the given segment.Reinterprets the segment if zero-length.
- Parameters:
segment- the memory segmentcount- the count of the buffer- Returns:
- the created instance or
nullif the segment isNULL
-
alloc
Allocates aSTBTTPackRangewith the given segment allocator.- Parameters:
allocator- the segment allocator- Returns:
- the allocated
STBTTPackRange
-
alloc
Allocates aSTBTTPackRangewith the given segment allocator and count.- Parameters:
allocator- the segment allocatorcount- the count- Returns:
- the allocated
STBTTPackRange
-
copyFrom
Copies from the given source.- Parameters:
src- the source- Returns:
this
-
reinterpret
Reinterprets this buffer with the given count.- Parameters:
count- the new count- Returns:
- the reinterpreted buffer
-
font_size
Returnsfont_sizeat the given index.- Parameters:
segment- the segment of the structindex- the index of the struct buffer- Returns:
font_sizeat the given index
-
font_size
public float font_size()Returnsfont_size.- Returns:
font_size
-
font_size
Setsfont_sizewith the given value at the given index.- Parameters:
segment- the segment of the structindex- the index of the struct buffervalue- the value
-
font_size
Setsfont_sizewith the given value.- Parameters:
value- the value- Returns:
this
-
first_unicode_codepoint_in_range
Returnsfirst_unicode_codepoint_in_rangeat the given index.- Parameters:
segment- the segment of the structindex- the index of the struct buffer- Returns:
first_unicode_codepoint_in_rangeat the given index
-
first_unicode_codepoint_in_range
public int first_unicode_codepoint_in_range()Returnsfirst_unicode_codepoint_in_range.- Returns:
first_unicode_codepoint_in_range
-
first_unicode_codepoint_in_range
Setsfirst_unicode_codepoint_in_rangewith the given value at the given index.- Parameters:
segment- the segment of the structindex- the index of the struct buffervalue- the value
-
first_unicode_codepoint_in_range
Setsfirst_unicode_codepoint_in_rangewith the given value.- Parameters:
value- the value- Returns:
this
-
array_of_unicode_codepoints
Returnsarray_of_unicode_codepointsat the given index.- Parameters:
segment- the segment of the structindex- the index of the struct buffer- Returns:
array_of_unicode_codepointsat the given index
-
array_of_unicode_codepoints
Returnsarray_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) Setsarray_of_unicode_codepointswith the given value at the given index.- Parameters:
segment- the segment of the structindex- the index of the struct buffervalue- the value
-
array_of_unicode_codepoints
Setsarray_of_unicode_codepointswith the given value.- Parameters:
value- the value- Returns:
this
-
num_chars
Returnsnum_charsat the given index.- Parameters:
segment- the segment of the structindex- the index of the struct buffer- Returns:
num_charsat the given index
-
num_chars
public int num_chars()Returnsnum_chars.- Returns:
num_chars
-
num_chars
Setsnum_charswith the given value at the given index.- Parameters:
segment- the segment of the structindex- the index of the struct buffervalue- the value
-
num_chars
Setsnum_charswith the given value.- Parameters:
value- the value- Returns:
this
-
chardata_for_range
Returnschardata_for_rangeat the given index.- Parameters:
segment- the segment of the structindex- the index of the struct buffer- Returns:
chardata_for_rangeat the given index
-
chardata_for_range
-
chardata_for_range
Setschardata_for_rangewith the given value at the given index.- Parameters:
segment- the segment of the structindex- the index of the struct buffervalue- the value
-
chardata_for_range
Setschardata_for_rangewith the given value.- Parameters:
value- the value- Returns:
this
-
h_oversample
Returnsh_oversampleat the given index.- Parameters:
segment- the segment of the structindex- the index of the struct buffer- Returns:
h_oversampleat the given index
-
h_oversample
public byte h_oversample()Returnsh_oversample.- Returns:
h_oversample
-
h_oversample
Setsh_oversamplewith the given value at the given index.- Parameters:
segment- the segment of the structindex- the index of the struct buffervalue- the value
-
h_oversample
Setsh_oversamplewith the given value.- Parameters:
value- the value- Returns:
this
-
v_oversample
Returnsv_oversampleat the given index.- Parameters:
segment- the segment of the structindex- the index of the struct buffer- Returns:
v_oversampleat the given index
-
v_oversample
public byte v_oversample()Returnsv_oversample.- Returns:
v_oversample
-
v_oversample
Setsv_oversamplewith the given value at the given index.- Parameters:
segment- the segment of the structindex- the index of the struct buffervalue- the value
-
v_oversample
Setsv_oversamplewith the given value.- Parameters:
value- the value- Returns:
this
-
asSlice
Creates a slice ofSTBTTPackRange.- Parameters:
index- the index of the struct buffer- Returns:
- the slice of
STBTTPackRange
-
asSlice
Creates a slice ofSTBTTPackRange.- Parameters:
index- the index of the struct buffercount- the count- Returns:
- the slice of
STBTTPackRange
-
at
VisitsSTBTTPackRangebuffer at the given index.- Parameters:
index- the index of this bufferfunc- the function to run with the slice of this buffer- Returns:
this
-
font_sizeAt
public float font_sizeAt(long index) Returnsfont_sizeat the given index.- Parameters:
index- the index of the struct buffer- Returns:
font_sizeat the given index
-
font_sizeAt
Setsfont_sizewith the given value at the given index.- Parameters:
index- the index of the struct buffervalue- the value- Returns:
this
-
first_unicode_codepoint_in_rangeAt
public int first_unicode_codepoint_in_rangeAt(long index) Returnsfirst_unicode_codepoint_in_rangeat the given index.- Parameters:
index- the index of the struct buffer- Returns:
first_unicode_codepoint_in_rangeat the given index
-
first_unicode_codepoint_in_rangeAt
Setsfirst_unicode_codepoint_in_rangewith the given value at the given index.- Parameters:
index- the index of the struct buffervalue- the value- Returns:
this
-
array_of_unicode_codepointsAt
Returnsarray_of_unicode_codepointsat the given index.- Parameters:
index- the index of the struct buffer- Returns:
array_of_unicode_codepointsat the given index
-
array_of_unicode_codepointsAt
Setsarray_of_unicode_codepointswith the given value at the given index.- Parameters:
index- the index of the struct buffervalue- the value- Returns:
this
-
num_charsAt
public int num_charsAt(long index) Returnsnum_charsat the given index.- Parameters:
index- the index of the struct buffer- Returns:
num_charsat the given index
-
num_charsAt
Setsnum_charswith the given value at the given index.- Parameters:
index- the index of the struct buffervalue- the value- Returns:
this
-
chardata_for_rangeAt
Returnschardata_for_rangeat the given index.- Parameters:
index- the index of the struct buffer- Returns:
chardata_for_rangeat the given index
-
chardata_for_rangeAt
Setschardata_for_rangewith the given value at the given index.- Parameters:
index- the index of the struct buffervalue- the value- Returns:
this
-
h_oversampleAt
public byte h_oversampleAt(long index) Returnsh_oversampleat the given index.- Parameters:
index- the index of the struct buffer- Returns:
h_oversampleat the given index
-
h_oversampleAt
Setsh_oversamplewith the given value at the given index.- Parameters:
index- the index of the struct buffervalue- the value- Returns:
this
-
v_oversampleAt
public byte v_oversampleAt(long index) Returnsv_oversampleat the given index.- Parameters:
index- the index of the struct buffer- Returns:
v_oversampleat the given index
-
v_oversampleAt
Setsv_oversamplewith the given value at the given index.- Parameters:
index- the index of the struct buffervalue- the value- Returns:
this
-