Package org.lwjgl.stb
Class STBTTPackRange
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
struct stbtt_pack_range {
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;
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionSTBTTPackRange(ByteBuffer container) Creates aSTBTTPackRangeinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescription@Nullable IntBufferarray_of_unicode_codepoints(@Nullable IntBuffer value) Sets the address of the specifiedIntBufferto thearray_of_unicode_codepointsfield.static STBTTPackRangecalloc()Returns a newSTBTTPackRangeinstance allocated withmemCalloc.static STBTTPackRange.Buffercalloc(int capacity) Returns a newSTBTTPackRange.Bufferinstance allocated withmemCalloc.static STBTTPackRange.Buffercalloc(int capacity, MemoryStack stack) Returns a newSTBTTPackRange.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static STBTTPackRangecalloc(MemoryStack stack) Returns a newSTBTTPackRangeinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.Sets the address of the specifiedSTBTTPackedchar.Bufferto thechardata_for_rangefield.static STBTTPackRangecreate()Returns a newSTBTTPackRangeinstance allocated withBufferUtils.static STBTTPackRange.Buffercreate(int capacity) Returns a newSTBTTPackRange.Bufferinstance allocated withBufferUtils.static STBTTPackRangecreate(long address) Returns a newSTBTTPackRangeinstance for the specified memory address.static STBTTPackRange.Buffercreate(long address, int capacity) Create aSTBTTPackRange.Bufferinstance at the specified memory.static @Nullable STBTTPackRangecreateSafe(long address) static @Nullable STBTTPackRange.BuffercreateSafe(long address, int capacity) intfirst_unicode_codepoint_in_range(int value) Sets the specified value to thefirst_unicode_codepoint_in_rangefield.floatfont_size(float value) Sets the specified value to thefont_sizefield.byteh_oversample(byte value) Sets the specified value to theh_oversamplefield.static STBTTPackRangemalloc()Returns a newSTBTTPackRangeinstance allocated withmemAlloc.static STBTTPackRange.Buffermalloc(int capacity) Returns a newSTBTTPackRange.Bufferinstance allocated withmemAlloc.static STBTTPackRange.Buffermalloc(int capacity, MemoryStack stack) Returns a newSTBTTPackRange.Bufferinstance allocated on the specifiedMemoryStack.static STBTTPackRangemalloc(MemoryStack stack) Returns a newSTBTTPackRangeinstance allocated on the specifiedMemoryStack.static @Nullable IntBuffernarray_of_unicode_codepoints(long struct) Unsafe version ofarray_of_unicode_codepoints.static voidnarray_of_unicode_codepoints(long struct, @Nullable IntBuffer value) Unsafe version ofarray_of_unicode_codepoints.static STBTTPackedchar.Buffernchardata_for_range(long struct) Unsafe version ofchardata_for_range().static voidnchardata_for_range(long struct, STBTTPackedchar.Buffer value) Unsafe version ofchardata_for_range.static intnfirst_unicode_codepoint_in_range(long struct) Unsafe version offirst_unicode_codepoint_in_range().static voidnfirst_unicode_codepoint_in_range(long struct, int value) Unsafe version offirst_unicode_codepoint_in_range.static floatnfont_size(long struct) Unsafe version offont_size().static voidnfont_size(long struct, float value) Unsafe version offont_size.static bytenh_oversample(long struct) Unsafe version ofh_oversample().static voidnh_oversample(long struct, byte value) Unsafe version ofh_oversample.static intnnum_chars(long struct) Unsafe version ofnum_chars().static voidnnum_chars(long struct, int value) Sets the specified value to thenum_charsfield of the specifiedstruct.intnum_chars(int value) Sets the specified value to thenum_charsfield.static bytenv_oversample(long struct) Unsafe version ofv_oversample().static voidnv_oversample(long struct, byte value) Unsafe version ofv_oversample.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(STBTTPackRange src) Copies the specified struct data to this struct.intsizeof()Returnssizeof(struct).bytev_oversample(byte value) Sets the specified value to thev_oversamplefield.static voidvalidate(long struct) Validates pointer members that should not beNULL.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
FONT_SIZE
public static final int FONT_SIZEThe struct member offsets. -
FIRST_UNICODE_CODEPOINT_IN_RANGE
public static final int FIRST_UNICODE_CODEPOINT_IN_RANGEThe struct member offsets. -
ARRAY_OF_UNICODE_CODEPOINTS
public static final int ARRAY_OF_UNICODE_CODEPOINTSThe struct member offsets. -
NUM_CHARS
public static final int NUM_CHARSThe struct member offsets. -
CHARDATA_FOR_RANGE
public static final int CHARDATA_FOR_RANGEThe struct member offsets. -
H_OVERSAMPLE
public static final int H_OVERSAMPLEThe struct member offsets. -
V_OVERSAMPLE
public static final int V_OVERSAMPLEThe struct member offsets.
-
-
Constructor Details
-
STBTTPackRange
Creates aSTBTTPackRangeinstance at the current position of the specifiedByteBuffercontainer. 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:StructReturnssizeof(struct).- Specified by:
sizeofin classStruct<STBTTPackRange>
-
font_size
public float font_size()- Returns:
- the value of the
font_sizefield.
-
first_unicode_codepoint_in_range
public int first_unicode_codepoint_in_range()- Returns:
- the value of the
first_unicode_codepoint_in_rangefield.
-
array_of_unicode_codepoints
- Returns:
- a
IntBufferview of the data pointed to by thearray_of_unicode_codepointsfield.
-
num_chars
public int num_chars()- Returns:
- the value of the
num_charsfield.
-
chardata_for_range
- Returns:
- a
STBTTPackedchar.Bufferview of the struct array pointed to by thechardata_for_rangefield.
-
h_oversample
public byte h_oversample()- Returns:
- the value of the
h_oversamplefield.
-
v_oversample
public byte v_oversample()- Returns:
- the value of the
v_oversamplefield.
-
font_size
Sets the specified value to thefont_sizefield. -
first_unicode_codepoint_in_range
Sets the specified value to thefirst_unicode_codepoint_in_rangefield. -
array_of_unicode_codepoints
Sets the address of the specifiedIntBufferto thearray_of_unicode_codepointsfield. -
num_chars
Sets the specified value to thenum_charsfield. -
chardata_for_range
Sets the address of the specifiedSTBTTPackedchar.Bufferto thechardata_for_rangefield. -
h_oversample
Sets the specified value to theh_oversamplefield. -
v_oversample
Sets the specified value to thev_oversamplefield. -
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
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newSTBTTPackRangeinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newSTBTTPackRangeinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newSTBTTPackRangeinstance allocated withBufferUtils. -
create
Returns a newSTBTTPackRangeinstance for the specified memory address. -
createSafe
-
malloc
Returns a newSTBTTPackRange.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newSTBTTPackRange.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newSTBTTPackRange.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aSTBTTPackRange.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newSTBTTPackRangeinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newSTBTTPackRangeinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newSTBTTPackRange.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newSTBTTPackRange.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nfont_size
public static float nfont_size(long struct) Unsafe version offont_size(). -
nfirst_unicode_codepoint_in_range
public static int nfirst_unicode_codepoint_in_range(long struct) Unsafe version offirst_unicode_codepoint_in_range(). -
narray_of_unicode_codepoints
Unsafe version ofarray_of_unicode_codepoints. -
nnum_chars
public static int nnum_chars(long struct) Unsafe version ofnum_chars(). -
nchardata_for_range
Unsafe version ofchardata_for_range(). -
nh_oversample
public static byte nh_oversample(long struct) Unsafe version ofh_oversample(). -
nv_oversample
public static byte nv_oversample(long struct) Unsafe version ofv_oversample(). -
nfont_size
public static void nfont_size(long struct, float value) Unsafe version offont_size. -
nfirst_unicode_codepoint_in_range
public static void nfirst_unicode_codepoint_in_range(long struct, int value) Unsafe version offirst_unicode_codepoint_in_range. -
narray_of_unicode_codepoints
Unsafe version ofarray_of_unicode_codepoints. -
nnum_chars
public static void nnum_chars(long struct, int value) Sets the specified value to thenum_charsfield of the specifiedstruct. -
nchardata_for_range
Unsafe version ofchardata_for_range. -
nh_oversample
public static void nh_oversample(long struct, byte value) Unsafe version ofh_oversample. -
nv_oversample
public static void nv_oversample(long struct, byte value) Unsafe version ofv_oversample. -
validate
public static void validate(long struct) Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-