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;
{@link STBTTPackedchar 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.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct size in bytes.static final int
The 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 aSTBTTPackRange
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescription@Nullable IntBuffer
array_of_unicode_codepoints
(@Nullable IntBuffer value) Sets the address of the specifiedIntBuffer
to thearray_of_unicode_codepoints
field.static STBTTPackRange
calloc()
Returns a newSTBTTPackRange
instance allocated withmemCalloc
.static STBTTPackRange.Buffer
calloc
(int capacity) Returns a newSTBTTPackRange.Buffer
instance allocated withmemCalloc
.static STBTTPackRange.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newSTBTTPackRange.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static STBTTPackRange
calloc
(MemoryStack stack) Returns a newSTBTTPackRange
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static STBTTPackRange
Deprecated.static STBTTPackRange.Buffer
callocStack
(int capacity) Deprecated.static STBTTPackRange.Buffer
callocStack
(int capacity, MemoryStack stack) Deprecated.static STBTTPackRange
callocStack
(MemoryStack stack) Deprecated.Sets the address of the specifiedSTBTTPackedchar.Buffer
to thechardata_for_range
field.static STBTTPackRange
create()
Returns a newSTBTTPackRange
instance allocated withBufferUtils
.static STBTTPackRange.Buffer
create
(int capacity) Returns a newSTBTTPackRange.Buffer
instance allocated withBufferUtils
.static STBTTPackRange
create
(long address) Returns a newSTBTTPackRange
instance for the specified memory address.static STBTTPackRange.Buffer
create
(long address, int capacity) Create aSTBTTPackRange.Buffer
instance at the specified memory.static @Nullable STBTTPackRange
createSafe
(long address) static @Nullable STBTTPackRange.Buffer
createSafe
(long address, int capacity) int
first_unicode_codepoint_in_range
(int value) Sets the specified value to thefirst_unicode_codepoint_in_range
field.float
font_size
(float value) Sets the specified value to thefont_size
field.byte
h_oversample
(byte value) Sets the specified value to theh_oversample
field.static STBTTPackRange
malloc()
Returns a newSTBTTPackRange
instance allocated withmemAlloc
.static STBTTPackRange.Buffer
malloc
(int capacity) Returns a newSTBTTPackRange.Buffer
instance allocated withmemAlloc
.static STBTTPackRange.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newSTBTTPackRange.Buffer
instance allocated on the specifiedMemoryStack
.static STBTTPackRange
malloc
(MemoryStack stack) Returns a newSTBTTPackRange
instance allocated on the specifiedMemoryStack
.static STBTTPackRange
Deprecated.static STBTTPackRange.Buffer
mallocStack
(int capacity) Deprecated.static STBTTPackRange.Buffer
mallocStack
(int capacity, MemoryStack stack) Deprecated.static STBTTPackRange
mallocStack
(MemoryStack stack) Deprecated.static @Nullable IntBuffer
narray_of_unicode_codepoints
(long struct) Unsafe version ofarray_of_unicode_codepoints
.static void
narray_of_unicode_codepoints
(long struct, @Nullable IntBuffer value) Unsafe version ofarray_of_unicode_codepoints
.static STBTTPackedchar.Buffer
nchardata_for_range
(long struct) Unsafe version ofchardata_for_range()
.static void
nchardata_for_range
(long struct, STBTTPackedchar.Buffer value) Unsafe version ofchardata_for_range
.static int
nfirst_unicode_codepoint_in_range
(long struct) Unsafe version offirst_unicode_codepoint_in_range()
.static void
nfirst_unicode_codepoint_in_range
(long struct, int value) Unsafe version offirst_unicode_codepoint_in_range
.static float
nfont_size
(long struct) Unsafe version offont_size()
.static void
nfont_size
(long struct, float value) Unsafe version offont_size
.static byte
nh_oversample
(long struct) Unsafe version ofh_oversample()
.static void
nh_oversample
(long struct, byte value) Unsafe version ofh_oversample
.static int
nnum_chars
(long struct) Unsafe version ofnum_chars()
.static void
nnum_chars
(long struct, int value) Sets the specified value to thenum_chars
field of the specifiedstruct
.int
num_chars
(int value) Sets the specified value to thenum_chars
field.static byte
nv_oversample
(long struct) Unsafe version ofv_oversample()
.static void
nv_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.int
sizeof()
Returnssizeof(struct)
.byte
v_oversample
(byte value) Sets the specified value to thev_oversample
field.static void
validate
(long struct) Validates pointer members that should not beNULL
.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods 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 aSTBTTPackRange
instance at the current position of the specifiedByteBuffer
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
Returnssizeof(struct)
.- Specified by:
sizeof
in classStruct<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
- Returns:
- a
IntBuffer
view of the data pointed to by thearray_of_unicode_codepoints
field.
-
num_chars
public int num_chars()- Returns:
- the value of the
num_chars
field.
-
chardata_for_range
- Returns:
- a
STBTTPackedchar.Buffer
view of the struct array pointed to by thechardata_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
Sets the specified value to thefont_size
field. -
first_unicode_codepoint_in_range
Sets the specified value to thefirst_unicode_codepoint_in_range
field. -
array_of_unicode_codepoints
Sets the address of the specifiedIntBuffer
to thearray_of_unicode_codepoints
field. -
num_chars
Sets the specified value to thenum_chars
field. -
chardata_for_range
Sets the address of the specifiedSTBTTPackedchar.Buffer
to thechardata_for_range
field. -
h_oversample
Sets the specified value to theh_oversample
field. -
v_oversample
Sets the specified value to thev_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
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
Returns a newSTBTTPackRange
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newSTBTTPackRange
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newSTBTTPackRange
instance allocated withBufferUtils
. -
create
Returns a newSTBTTPackRange
instance for the specified memory address. -
createSafe
-
malloc
Returns a newSTBTTPackRange.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newSTBTTPackRange.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newSTBTTPackRange.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aSTBTTPackRange.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
malloc
Returns a newSTBTTPackRange
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newSTBTTPackRange
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newSTBTTPackRange.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newSTBTTPackRange.Buffer
instance allocated on the specifiedMemoryStack
and 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_chars
field 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
-