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 byPackFontRangesLayout
struct stbtt_pack_range { floatfont_size(); intfirst_unicode_codepoint_in_range(); int *array_of_unicode_codepoints(); intnum_chars();stbtt_packedchar*chardata_for_range(); unsigned charh_oversample(); unsigned charv_oversample(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSTBTTPackRange.BufferAn array ofSTBTTPackRangestructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intARRAY_OF_UNICODE_CODEPOINTS
CHARDATA_FOR_RANGE
FIRST_UNICODE_CODEPOINT_IN_RANGE
FONT_SIZE
H_OVERSAMPLE
NUM_CHARSThe struct member offsets.static intSIZEOFThe struct size in bytes.static intV_OVERSAMPLEThe struct member offsets.
-
Constructor Summary
Constructors Constructor 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 Deprecated Methods Modifier and Type Method Description java.nio.IntBufferarray_of_unicode_codepoints()if non-zero, then this is an array of unicode codepointsSTBTTPackRangearray_of_unicode_codepoints(java.nio.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 STBTTPackRangecallocStack()Deprecated.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.STBTTPackedchar.Bufferchardata_for_range()outputSTBTTPackRangechardata_for_range(STBTTPackedchar.Buffer value)Sets 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 STBTTPackRangecreateSafe(long address)static STBTTPackRange.BuffercreateSafe(long address, int capacity)intfirst_unicode_codepoint_in_range()if non-zero, then the chars are continuous, and this is the first codepointSTBTTPackRangefirst_unicode_codepoint_in_range(int value)Sets the specified value to thefirst_unicode_codepoint_in_range()field.floatfont_size()the font sizeSTBTTPackRangefont_size(float value)Sets the specified value to thefont_size()field.byteh_oversample()used internallySTBTTPackRangeh_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 STBTTPackRangemallocStack()Deprecated.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 java.nio.IntBuffernarray_of_unicode_codepoints(long struct)Unsafe version ofarray_of_unicode_codepoints.static voidnarray_of_unicode_codepoints(long struct, java.nio.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()the number of codepoints in the rangeSTBTTPackRangenum_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.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, byte h_oversample, byte v_oversample)Initializes this struct with the specified values.STBTTPackRangeset(STBTTPackRange src)Copies the specified struct data to this struct.intsizeof()bytev_oversample()used internallySTBTTPackRangev_oversample(byte value)Sets the specified value to thev_oversample()field.static voidvalidate(long struct)Validates pointer members that should not beNULL.
-
-
-
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()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
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
@Nullable public java.nio.IntBuffer 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
public STBTTPackedchar.Buffer chardata_for_range()
output
-
h_oversample, v_oversample
public byte h_oversample() public byte v_oversample()
used internally
-
font_size
public STBTTPackRange font_size(float value)
Sets the specified value to thefont_size()field.
-
first_unicode_codepoint_in_range
public STBTTPackRange first_unicode_codepoint_in_range(int value)
Sets the specified value to thefirst_unicode_codepoint_in_range()field.
-
array_of_unicode_codepoints
public STBTTPackRange array_of_unicode_codepoints(@Nullable java.nio.IntBuffer value)
Sets the address of the specifiedIntBufferto thearray_of_unicode_codepoints()field.
-
num_chars
public STBTTPackRange num_chars(int value)
Sets the specified value to thenum_chars()field.
-
chardata_for_range
public STBTTPackRange chardata_for_range(STBTTPackedchar.Buffer value)
Sets the address of the specifiedSTBTTPackedchar.Bufferto thechardata_for_range()field.
-
h_oversample
public STBTTPackRange h_oversample(byte value)
Sets the specified value to theh_oversample()field.
-
v_oversample
public STBTTPackRange v_oversample(byte value)
Sets the specified value to thev_oversample()field.
-
set
public STBTTPackRange set(float font_size, int first_unicode_codepoint_in_range, @Nullable java.nio.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
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.
-
createSafe
@Nullable public static STBTTPackRange createSafe(long address)
-
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
-
createSafe
@Nullable public static STBTTPackRange.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static STBTTPackRange mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static STBTTPackRange callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static STBTTPackRange mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static STBTTPackRange callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static STBTTPackRange.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static STBTTPackRange.Buffer callocStack(int capacity)
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
public static STBTTPackRange malloc(org.lwjgl.system.MemoryStack stack)
Returns a newSTBTTPackRangeinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static STBTTPackRange calloc(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
-
malloc
public static STBTTPackRange.Buffer malloc(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
-
calloc
public static STBTTPackRange.Buffer calloc(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
-
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
@Nullable public static java.nio.IntBuffer narray_of_unicode_codepoints(long struct)
Unsafe version ofarray_of_unicode_codepoints.
-
nnum_chars
public static int nnum_chars(long struct)
Unsafe version ofnum_chars().
-
nchardata_for_range
public static STBTTPackedchar.Buffer nchardata_for_range(long struct)
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
public static void narray_of_unicode_codepoints(long struct, @Nullable java.nio.IntBuffer value)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
public static void nchardata_for_range(long struct, STBTTPackedchar.Buffer value)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
-
-