public class STBTTPackRange
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
PackFontRanges
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 – outputh_oversample – used internallyv_oversample – used internally
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;
}| Modifier and Type | Class and Description |
|---|---|
static class |
STBTTPackRange.Buffer
An array of
STBTTPackRange structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
ARRAY_OF_UNICODE_CODEPOINTS
The struct member offsets.
|
static int |
CHARDATA_FOR_RANGE
The struct member offsets.
|
static int |
FIRST_UNICODE_CODEPOINT_IN_RANGE
The struct member offsets.
|
static int |
FONT_SIZE
The struct member offsets.
|
static int |
H_OVERSAMPLE
The struct member offsets.
|
static int |
NUM_CHARS
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
static int |
V_OVERSAMPLE
The struct member offsets.
|
| Constructor and Description |
|---|
STBTTPackRange(java.nio.ByteBuffer container)
Creates a
STBTTPackRange instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
java.nio.IntBuffer |
array_of_unicode_codepoints()
Returns a
IntBuffer view of the data pointed to by the array_of_unicode_codepoints field. |
STBTTPackRange |
array_of_unicode_codepoints(java.nio.IntBuffer value)
Sets the address of the specified
IntBuffer to the array_of_unicode_codepoints field. |
static STBTTPackRange |
calloc()
Returns a new
STBTTPackRange instance allocated with memCalloc. |
static STBTTPackRange.Buffer |
calloc(int capacity)
Returns a new
STBTTPackRange.Buffer instance allocated with memCalloc. |
static STBTTPackRange |
callocStack()
Returns a new
STBTTPackRange instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static STBTTPackRange.Buffer |
callocStack(int capacity)
Returns a new
STBTTPackRange.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static STBTTPackRange.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
STBTTPackRange.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static STBTTPackRange |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
STBTTPackRange instance allocated on the specified MemoryStack and initializes all its bits to zero. |
STBTTPackedchar.Buffer |
chardata_for_range()
Returns a
STBTTPackedchar.Buffer view of the struct array pointed to by the chardata_for_range field. |
STBTTPackRange |
chardata_for_range(STBTTPackedchar.Buffer value)
Sets the address of the specified
STBTTPackedchar.Buffer to the chardata_for_range field. |
static STBTTPackRange |
create()
Returns a new
STBTTPackRange instance allocated with BufferUtils. |
static STBTTPackRange.Buffer |
create(int capacity)
Returns a new
STBTTPackRange.Buffer instance allocated with BufferUtils. |
static STBTTPackRange |
create(long address)
Returns a new
STBTTPackRange instance for the specified memory address. |
static STBTTPackRange.Buffer |
create(long address,
int capacity)
Create a
STBTTPackRange.Buffer instance at the specified memory. |
static STBTTPackRange |
createSafe(long address)
|
static STBTTPackRange.Buffer |
createSafe(long address,
int capacity)
|
int |
first_unicode_codepoint_in_range()
Returns the value of the
first_unicode_codepoint_in_range field. |
STBTTPackRange |
first_unicode_codepoint_in_range(int value)
Sets the specified value to the
first_unicode_codepoint_in_range field. |
float |
font_size()
Returns the value of the
font_size field. |
STBTTPackRange |
font_size(float value)
Sets the specified value to the
font_size field. |
byte |
h_oversample()
Returns the value of the
h_oversample field. |
STBTTPackRange |
h_oversample(byte value)
Sets the specified value to the
h_oversample field. |
static STBTTPackRange |
malloc()
Returns a new
STBTTPackRange instance allocated with memAlloc. |
static STBTTPackRange.Buffer |
malloc(int capacity)
Returns a new
STBTTPackRange.Buffer instance allocated with memAlloc. |
static STBTTPackRange |
mallocStack()
Returns a new
STBTTPackRange instance allocated on the thread-local MemoryStack. |
static STBTTPackRange.Buffer |
mallocStack(int capacity)
Returns a new
STBTTPackRange.Buffer instance allocated on the thread-local MemoryStack. |
static STBTTPackRange.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
STBTTPackRange.Buffer instance allocated on the specified MemoryStack. |
static STBTTPackRange |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
STBTTPackRange instance allocated on the specified MemoryStack. |
static java.nio.IntBuffer |
narray_of_unicode_codepoints(long struct)
Unsafe version of
array_of_unicode_codepoints. |
static void |
narray_of_unicode_codepoints(long struct,
java.nio.IntBuffer value)
Unsafe version of
array_of_unicode_codepoints. |
static STBTTPackedchar.Buffer |
nchardata_for_range(long struct)
Unsafe version of
chardata_for_range(). |
static void |
nchardata_for_range(long struct,
STBTTPackedchar.Buffer value)
Unsafe version of
chardata_for_range. |
static int |
nfirst_unicode_codepoint_in_range(long struct)
Unsafe version of
first_unicode_codepoint_in_range(). |
static void |
nfirst_unicode_codepoint_in_range(long struct,
int value)
Unsafe version of
first_unicode_codepoint_in_range. |
static float |
nfont_size(long struct)
Unsafe version of
font_size(). |
static void |
nfont_size(long struct,
float value)
Unsafe version of
font_size. |
static byte |
nh_oversample(long struct)
Unsafe version of
h_oversample(). |
static void |
nh_oversample(long struct,
byte value)
Unsafe version of
h_oversample. |
static int |
nnum_chars(long struct)
Unsafe version of
num_chars(). |
static void |
nnum_chars(long struct,
int value)
Sets the specified value to the
num_chars field of the specified struct. |
int |
num_chars()
Returns the value of the
num_chars field. |
STBTTPackRange |
num_chars(int value)
Sets the specified value to the
num_chars field. |
static byte |
nv_oversample(long struct)
Unsafe version of
v_oversample(). |
static void |
nv_oversample(long struct,
byte value)
Unsafe version of
v_oversample. |
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,
byte h_oversample,
byte v_oversample)
Initializes this struct with the specified values.
|
STBTTPackRange |
set(STBTTPackRange src)
Copies the specified struct data to this struct.
|
int |
sizeof() |
byte |
v_oversample()
Returns the value of the
v_oversample field. |
STBTTPackRange |
v_oversample(byte value)
Sets the specified value to the
v_oversample field. |
static void |
validate(long struct)
Validates pointer members that should not be
NULL. |
static void |
validate(long array,
int count)
Calls
validate(long) for each struct contained in the specified struct array. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int FONT_SIZE
public static final int FIRST_UNICODE_CODEPOINT_IN_RANGE
public static final int ARRAY_OF_UNICODE_CODEPOINTS
public static final int NUM_CHARS
public static final int CHARDATA_FOR_RANGE
public static final int H_OVERSAMPLE
public static final int V_OVERSAMPLE
public STBTTPackRange(java.nio.ByteBuffer container)
STBTTPackRange instance at the current position of the specified ByteBuffer 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.
public int sizeof()
sizeof in class org.lwjgl.system.Structpublic float font_size()
font_size field.public int first_unicode_codepoint_in_range()
first_unicode_codepoint_in_range field.@Nullable public java.nio.IntBuffer array_of_unicode_codepoints()
IntBuffer view of the data pointed to by the array_of_unicode_codepoints field.public int num_chars()
num_chars field.public STBTTPackedchar.Buffer chardata_for_range()
STBTTPackedchar.Buffer view of the struct array pointed to by the chardata_for_range field.public byte h_oversample()
h_oversample field.public byte v_oversample()
v_oversample field.public STBTTPackRange font_size(float value)
font_size field.public STBTTPackRange first_unicode_codepoint_in_range(int value)
first_unicode_codepoint_in_range field.public STBTTPackRange array_of_unicode_codepoints(@Nullable java.nio.IntBuffer value)
IntBuffer to the array_of_unicode_codepoints field.public STBTTPackRange num_chars(int value)
num_chars field.public STBTTPackRange chardata_for_range(STBTTPackedchar.Buffer value)
STBTTPackedchar.Buffer to the chardata_for_range field.public STBTTPackRange h_oversample(byte value)
h_oversample field.public STBTTPackRange v_oversample(byte value)
v_oversample field.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)
public STBTTPackRange set(STBTTPackRange src)
src - the source structpublic static STBTTPackRange malloc()
STBTTPackRange instance allocated with memAlloc. The instance must be explicitly freed.public static STBTTPackRange calloc()
STBTTPackRange instance allocated with memCalloc. The instance must be explicitly freed.public static STBTTPackRange create()
STBTTPackRange instance allocated with BufferUtils.public static STBTTPackRange create(long address)
STBTTPackRange instance for the specified memory address.@Nullable public static STBTTPackRange createSafe(long address)
public static STBTTPackRange.Buffer malloc(int capacity)
STBTTPackRange.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static STBTTPackRange.Buffer calloc(int capacity)
STBTTPackRange.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static STBTTPackRange.Buffer create(int capacity)
STBTTPackRange.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static STBTTPackRange.Buffer create(long address, int capacity)
STBTTPackRange.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static STBTTPackRange.Buffer createSafe(long address, int capacity)
public static STBTTPackRange mallocStack()
STBTTPackRange instance allocated on the thread-local MemoryStack.public static STBTTPackRange callocStack()
STBTTPackRange instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static STBTTPackRange mallocStack(org.lwjgl.system.MemoryStack stack)
STBTTPackRange instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static STBTTPackRange callocStack(org.lwjgl.system.MemoryStack stack)
STBTTPackRange instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static STBTTPackRange.Buffer mallocStack(int capacity)
STBTTPackRange.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static STBTTPackRange.Buffer callocStack(int capacity)
STBTTPackRange.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static STBTTPackRange.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
STBTTPackRange.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static STBTTPackRange.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
STBTTPackRange.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatecapacity - the buffer capacitypublic static float nfont_size(long struct)
font_size().public static int nfirst_unicode_codepoint_in_range(long struct)
first_unicode_codepoint_in_range().@Nullable public static java.nio.IntBuffer narray_of_unicode_codepoints(long struct)
array_of_unicode_codepoints.public static int nnum_chars(long struct)
num_chars().public static STBTTPackedchar.Buffer nchardata_for_range(long struct)
chardata_for_range().public static byte nh_oversample(long struct)
h_oversample().public static byte nv_oversample(long struct)
v_oversample().public static void nfont_size(long struct,
float value)
font_size.public static void nfirst_unicode_codepoint_in_range(long struct,
int value)
first_unicode_codepoint_in_range.public static void narray_of_unicode_codepoints(long struct,
@Nullable
java.nio.IntBuffer value)
array_of_unicode_codepoints.public static void nnum_chars(long struct,
int value)
num_chars field of the specified struct.public static void nchardata_for_range(long struct,
STBTTPackedchar.Buffer value)
chardata_for_range.public static void nh_oversample(long struct,
byte value)
h_oversample.public static void nv_oversample(long struct,
byte value)
v_oversample.public static void validate(long struct)
NULL.struct - the struct to validatepublic static void validate(long array,
int count)
validate(long) for each struct contained in the specified struct array.array - the struct array to validatecount - the number of structs in arrayCopyright LWJGL. All Rights Reserved. License terms.