Package org.lwjgl.stb
Class STBTTPackRange
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.stb.STBTTPackRange
-
- All Implemented Interfaces:
- java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer
public class STBTTPackRange extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceA range of packed character data, used byPackFontRangesMember documentation
font_size– the font sizefirst_unicode_codepoint_in_range– if non-zero, then the chars are continuous, and this is the first codepointarray_of_unicode_codepoints– if non-zero, then this is an array of unicode codepointsnum_chars– the number of codepoints in the rangechardata_for_range– output
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 Classes Modifier and Type Class and Description static classSTBTTPackRange.BufferAn array ofSTBTTPackRangestructs.
-
Field Summary
Fields Modifier and Type Field and Description static intSIZEOFThe struct size in bytes.
-
Constructor Summary
Constructors Constructor and Description STBTTPackRange(java.nio.ByteBuffer container)Creates aSTBTTPackRangeinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.nio.IntBufferarray_of_unicode_codepoints()Returns aIntBufferview of the data pointed to by thearray_of_unicode_codepointsfield.STBTTPackRangearray_of_unicode_codepoints(java.nio.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 STBTTPackRangecallocStack()Returns a newSTBTTPackRangeinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static STBTTPackRange.BuffercallocStack(int capacity)Returns a newSTBTTPackRange.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static STBTTPackRange.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newSTBTTPackRange.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static STBTTPackRangecallocStack(org.lwjgl.system.MemoryStack stack)Returns a newSTBTTPackRangeinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.STBTTPackedchar.Bufferchardata_for_range()Returns aSTBTTPackedchar.Bufferview of the struct array pointed to by thechardata_for_rangefield.STBTTPackRangechardata_for_range(STBTTPackedchar.Buffer value)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 ornullif the address isNULL.static STBTTPackRange.Buffercreate(long address, int capacity)Create aSTBTTPackRange.Bufferinstance at the specified memory.intfirst_unicode_codepoint_in_range()Returns the value of thefirst_unicode_codepoint_in_rangefield.STBTTPackRangefirst_unicode_codepoint_in_range(int value)Sets the specified value to thefirst_unicode_codepoint_in_rangefield.floatfont_size()Returns the value of thefont_sizefield.STBTTPackRangefont_size(float value)Sets the specified value to thefont_sizefield.static STBTTPackRangemalloc()Returns a newSTBTTPackRangeinstance allocated withmemAlloc.static STBTTPackRange.Buffermalloc(int capacity)Returns a newSTBTTPackRange.Bufferinstance allocated withmemAlloc.static STBTTPackRangemallocStack()Returns a newSTBTTPackRangeinstance allocated on the thread-localMemoryStack.static STBTTPackRange.BuffermallocStack(int capacity)Returns a newSTBTTPackRange.Bufferinstance allocated on the thread-localMemoryStack.static STBTTPackRange.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newSTBTTPackRange.Bufferinstance allocated on the specifiedMemoryStack.static STBTTPackRangemallocStack(org.lwjgl.system.MemoryStack stack)Returns a newSTBTTPackRangeinstance allocated on the specifiedMemoryStack.static bytenh_oversample(long struct)static voidnh_oversample(long struct, byte value)STBTTPackRangenset(long struct)Unsafe version ofset.intnum_chars()Returns the value of thenum_charsfield.STBTTPackRangenum_chars(int value)Sets the specified value to thenum_charsfield.static bytenv_oversample(long struct)static voidnv_oversample(long struct, byte value)STBTTPackRangeset(float font_size, int first_unicode_codepoint_in_range, java.nio.IntBuffer array_of_unicode_codepoints, int num_chars, STBTTPackedchar.Buffer chardata_for_range)Initializes this struct with the specified values.STBTTPackRangeset(STBTTPackRange src)Copies the specified struct data to this struct.intsizeof()Returns thesizeof(struct).static voidvalidate(long struct)Validates pointer members that should not beNULL.static voidvalidate(long array, int count)CallsSTBTTPackRange.validate(long)for each struct contained in the specified struct array.
-
-
-
Constructor Detail
-
STBTTPackRange
public STBTTPackRange(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
Description copied from class:org.lwjgl.system.StructReturns thesizeof(struct).- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
font_size
public float font_size()
Returns the value of thefont_sizefield.
-
first_unicode_codepoint_in_range
public int first_unicode_codepoint_in_range()
Returns the value of thefirst_unicode_codepoint_in_rangefield.
-
array_of_unicode_codepoints
public java.nio.IntBuffer array_of_unicode_codepoints()
Returns aIntBufferview of the data pointed to by thearray_of_unicode_codepointsfield.
-
num_chars
public int num_chars()
Returns the value of thenum_charsfield.
-
chardata_for_range
public STBTTPackedchar.Buffer chardata_for_range()
Returns aSTBTTPackedchar.Bufferview of the struct array pointed to by thechardata_for_rangefield.
-
font_size
public STBTTPackRange font_size(float value)
Sets the specified value to thefont_sizefield.
-
first_unicode_codepoint_in_range
public STBTTPackRange first_unicode_codepoint_in_range(int value)
Sets the specified value to thefirst_unicode_codepoint_in_rangefield.
-
array_of_unicode_codepoints
public STBTTPackRange array_of_unicode_codepoints(java.nio.IntBuffer value)
Sets the address of the specifiedIntBufferto thearray_of_unicode_codepointsfield.
-
num_chars
public STBTTPackRange num_chars(int value)
Sets the specified value to thenum_charsfield.
-
chardata_for_range
public STBTTPackRange chardata_for_range(STBTTPackedchar.Buffer value)
Sets the address of the specifiedSTBTTPackedchar.Bufferto thechardata_for_rangefield.
-
set
public STBTTPackRange set(float font_size, int first_unicode_codepoint_in_range, java.nio.IntBuffer array_of_unicode_codepoints, int num_chars, STBTTPackedchar.Buffer chardata_for_range)
Initializes this struct with the specified values.
-
nset
public STBTTPackRange nset(long struct)
Unsafe version ofset.
-
set
public STBTTPackRange set(STBTTPackRange src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static STBTTPackRange malloc()
Returns a newSTBTTPackRangeinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static STBTTPackRange calloc()
Returns a newSTBTTPackRangeinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static STBTTPackRange create()
Returns a newSTBTTPackRangeinstance allocated withBufferUtils.
-
create
public static STBTTPackRange create(long address)
Returns a newSTBTTPackRangeinstance for the specified memory address ornullif the address isNULL.
-
malloc
public static STBTTPackRange.Buffer malloc(int capacity)
Returns a newSTBTTPackRange.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static STBTTPackRange.Buffer calloc(int capacity)
Returns a newSTBTTPackRange.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static STBTTPackRange.Buffer create(int capacity)
Returns a newSTBTTPackRange.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static STBTTPackRange.Buffer create(long address, int capacity)
Create aSTBTTPackRange.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
mallocStack
public static STBTTPackRange mallocStack()
Returns a newSTBTTPackRangeinstance allocated on the thread-localMemoryStack.
-
callocStack
public static STBTTPackRange callocStack()
Returns a newSTBTTPackRangeinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static STBTTPackRange mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newSTBTTPackRangeinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static STBTTPackRange callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newSTBTTPackRangeinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static STBTTPackRange.Buffer mallocStack(int capacity)
Returns a newSTBTTPackRange.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static STBTTPackRange.Buffer callocStack(int capacity)
Returns a newSTBTTPackRange.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static STBTTPackRange.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newSTBTTPackRange.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static STBTTPackRange.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newSTBTTPackRange.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nh_oversample
public static byte nh_oversample(long struct)
-
nv_oversample
public static byte nv_oversample(long struct)
-
nh_oversample
public static void nh_oversample(long struct, byte value)
-
nv_oversample
public static void nv_oversample(long struct, byte value)
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-
validate
public static void validate(long array, int count)CallsSTBTTPackRange.validate(long)for each struct contained in the specified struct array.- Parameters:
array- the struct array to validatecount- the number of structs inarray
-
-