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, NativeResource, Pointer
public class STBTTPackRange extends Struct
A range of packed character data, used bySTBTruetype.stbtt_PackFontRanges(org.lwjgl.stb.STBTTPackContext, java.nio.ByteBuffer, int, org.lwjgl.stb.STBTTPackRange.Buffer)Member 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; char[2]; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classSTBTTPackRange.BufferAn array ofSTBTTPackRangestructs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static intSIZEOFThe struct size in bytes.-
Fields inherited from interface org.lwjgl.system.Pointer
POINTER_SHIFT, POINTER_SIZE
-
-
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, MemoryStack stack)Returns a newSTBTTPackRange.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static STBTTPackRangecallocStack(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, MemoryStack stack)Returns a newSTBTTPackRange.Bufferinstance allocated on the specifiedMemoryStack.static STBTTPackRangemallocStack(MemoryStack stack)Returns a newSTBTTPackRangeinstance allocated on the specifiedMemoryStack.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.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.-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Methods inherited from interface org.lwjgl.system.NativeResource
close
-
-
-
-
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:StructReturns thesizeof(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(MemoryStack stack)
Returns a newSTBTTPackRangeinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static STBTTPackRange callocStack(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, 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, 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
-
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
-
-