Package org.lwjgl.stb
Class STBTTPackRange
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<STBTTPackRange>
org.lwjgl.stb.STBTTPackRange
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class STBTTPackRange
extends org.lwjgl.system.Struct<STBTTPackRange>
implements org.lwjgl.system.NativeResource
A range of packed character data, used by
PackFontRanges
Layout
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
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.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 IntBufferif non-zero, then this is an array of unicode codepointsarray_of_unicode_codepoints(@Nullable IntBuffer value) Sets the address of the specifiedIntBufferto thearray_of_unicode_codepoints()field.static STBTTPackRangecalloc()Returns a newSTBTTPackRangeinstance allocated withmemCalloc.static STBTTPackRange.Buffercalloc(int capacity) Returns a newSTBTTPackRange.Bufferinstance allocated withmemCalloc.static STBTTPackRange.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newSTBTTPackRange.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static STBTTPackRangecalloc(org.lwjgl.system.MemoryStack stack) Returns a newSTBTTPackRangeinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static STBTTPackRangeDeprecated.static STBTTPackRange.BuffercallocStack(int capacity) Deprecated.static STBTTPackRange.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static STBTTPackRangecallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.outputSets the address of the specifiedSTBTTPackedchar.Bufferto thechardata_for_range()field.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) intif non-zero, then the chars are continuous, and this is the first codepointfirst_unicode_codepoint_in_range(int value) Sets the specified value to thefirst_unicode_codepoint_in_range()field.floatthe font sizefont_size(float value) Sets the specified value to thefont_size()field.byteused internallyh_oversample(byte value) Sets the specified value to theh_oversample()field.static STBTTPackRangemalloc()Returns a newSTBTTPackRangeinstance allocated withmemAlloc.static STBTTPackRange.Buffermalloc(int capacity) Returns a newSTBTTPackRange.Bufferinstance allocated withmemAlloc.static STBTTPackRange.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newSTBTTPackRange.Bufferinstance allocated on the specifiedMemoryStack.static STBTTPackRangemalloc(org.lwjgl.system.MemoryStack stack) Returns a newSTBTTPackRangeinstance allocated on the specifiedMemoryStack.static STBTTPackRangeDeprecated.static STBTTPackRange.BuffermallocStack(int capacity) Deprecated.static STBTTPackRange.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static STBTTPackRangemallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.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.intthe number of codepoints in the rangenum_chars(int value) Sets the specified value to thenum_chars()field.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()byteused internallyv_oversample(byte value) Sets the specified value to thev_oversample()field.static voidvalidate(long struct) Validates pointer members that should not beNULL.Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods 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()- Specified by:
sizeofin classorg.lwjgl.system.Struct<STBTTPackRange>
-
font_size
public float font_size()the font size -
first_unicode_codepoint_in_range
public int first_unicode_codepoint_in_range()if non-zero, then the chars are continuous, and this is the first codepoint -
array_of_unicode_codepoints
if non-zero, then this is an array of unicode codepoints -
num_chars
public int num_chars()the number of codepoints in the range -
chardata_for_range
output -
h_oversample
public byte h_oversample()used internally -
v_oversample
public byte v_oversample()used internally -
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 specifiedIntBufferto thearray_of_unicode_codepoints()field. -
num_chars
Sets the specified value to thenum_chars()field. -
chardata_for_range
Sets the address of the specifiedSTBTTPackedchar.Bufferto 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 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
-
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 public static STBTTPackRange.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
@Deprecated public static STBTTPackRange.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
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
-