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.NativeResource
A range of packed character data, used byPackFontRanges
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; unsigned char h_oversample; unsigned char v_oversample; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
STBTTPackRange.Buffer
An array ofSTBTTPackRange
structs.
-
Field Summary
Fields Modifier and Type Field and Description static int
SIZEOF
The struct size in bytes.
-
Constructor Summary
Constructors Constructor and Description STBTTPackRange(java.nio.ByteBuffer container)
Creates aSTBTTPackRange
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.nio.IntBuffer
array_of_unicode_codepoints()
Returns aIntBuffer
view of the data pointed to by thearray_of_unicode_codepoints
field.STBTTPackRange
array_of_unicode_codepoints(java.nio.IntBuffer value)
Sets the address of the specifiedIntBuffer
to thearray_of_unicode_codepoints
field.static STBTTPackRange
calloc()
Returns a newSTBTTPackRange
instance allocated withmemCalloc
.static STBTTPackRange.Buffer
calloc(int capacity)
Returns a newSTBTTPackRange.Buffer
instance allocated withmemCalloc
.static STBTTPackRange
callocStack()
Returns a newSTBTTPackRange
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static STBTTPackRange.Buffer
callocStack(int capacity)
Returns a newSTBTTPackRange.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static STBTTPackRange.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newSTBTTPackRange.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static STBTTPackRange
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newSTBTTPackRange
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.STBTTPackedchar.Buffer
chardata_for_range()
Returns aSTBTTPackedchar.Buffer
view of the struct array pointed to by thechardata_for_range
field.STBTTPackRange
chardata_for_range(STBTTPackedchar.Buffer value)
Sets the address of the specifiedSTBTTPackedchar.Buffer
to thechardata_for_range
field.static STBTTPackRange
create()
Returns a newSTBTTPackRange
instance allocated withBufferUtils
.static STBTTPackRange.Buffer
create(int capacity)
Returns a newSTBTTPackRange.Buffer
instance allocated withBufferUtils
.static STBTTPackRange
create(long address)
Returns a newSTBTTPackRange
instance for the specified memory address ornull
if the address isNULL
.static STBTTPackRange.Buffer
create(long address, int capacity)
Create aSTBTTPackRange.Buffer
instance at the specified memory.int
first_unicode_codepoint_in_range()
Returns the value of thefirst_unicode_codepoint_in_range
field.STBTTPackRange
first_unicode_codepoint_in_range(int value)
Sets the specified value to thefirst_unicode_codepoint_in_range
field.float
font_size()
Returns the value of thefont_size
field.STBTTPackRange
font_size(float value)
Sets the specified value to thefont_size
field.static STBTTPackRange
malloc()
Returns a newSTBTTPackRange
instance allocated withmemAlloc
.static STBTTPackRange.Buffer
malloc(int capacity)
Returns a newSTBTTPackRange.Buffer
instance allocated withmemAlloc
.static STBTTPackRange
mallocStack()
Returns a newSTBTTPackRange
instance allocated on the thread-localMemoryStack
.static STBTTPackRange.Buffer
mallocStack(int capacity)
Returns a newSTBTTPackRange.Buffer
instance allocated on the thread-localMemoryStack
.static STBTTPackRange.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newSTBTTPackRange.Buffer
instance allocated on the specifiedMemoryStack
.static STBTTPackRange
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newSTBTTPackRange
instance allocated on the specifiedMemoryStack
.static byte
nh_oversample(long struct)
static void
nh_oversample(long struct, byte value)
STBTTPackRange
nset(long struct)
Unsafe version ofset
.int
num_chars()
Returns the value of thenum_chars
field.STBTTPackRange
num_chars(int value)
Sets the specified value to thenum_chars
field.static byte
nv_oversample(long struct)
static void
nv_oversample(long struct, byte value)
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.STBTTPackRange
set(STBTTPackRange src)
Copies the specified struct data to this struct.int
sizeof()
Returns thesizeof(struct)
.static void
validate(long struct)
Validates pointer members that should not beNULL
.static void
validate(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 aSTBTTPackRange
instance at the current position of the specifiedByteBuffer
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.
-
-
Method Detail
-
sizeof
public int sizeof()
Description copied from class:org.lwjgl.system.Struct
Returns thesizeof(struct)
.- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
font_size
public float font_size()
Returns the value of thefont_size
field.
-
first_unicode_codepoint_in_range
public int first_unicode_codepoint_in_range()
Returns the value of thefirst_unicode_codepoint_in_range
field.
-
array_of_unicode_codepoints
public java.nio.IntBuffer array_of_unicode_codepoints()
Returns aIntBuffer
view of the data pointed to by thearray_of_unicode_codepoints
field.
-
num_chars
public int num_chars()
Returns the value of thenum_chars
field.
-
chardata_for_range
public STBTTPackedchar.Buffer chardata_for_range()
Returns aSTBTTPackedchar.Buffer
view of the struct array pointed to by thechardata_for_range
field.
-
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(java.nio.IntBuffer value)
Sets the address of the specifiedIntBuffer
to 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.Buffer
to thechardata_for_range
field.
-
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 newSTBTTPackRange
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static STBTTPackRange calloc()
Returns a newSTBTTPackRange
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static STBTTPackRange create()
Returns a newSTBTTPackRange
instance allocated withBufferUtils
.
-
create
public static STBTTPackRange create(long address)
Returns a newSTBTTPackRange
instance for the specified memory address ornull
if the address isNULL
.
-
malloc
public static STBTTPackRange.Buffer malloc(int capacity)
Returns a newSTBTTPackRange.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static STBTTPackRange.Buffer calloc(int capacity)
Returns a newSTBTTPackRange.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static STBTTPackRange.Buffer create(int capacity)
Returns a newSTBTTPackRange.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static STBTTPackRange.Buffer create(long address, int capacity)
Create aSTBTTPackRange.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
mallocStack
public static STBTTPackRange mallocStack()
Returns a newSTBTTPackRange
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static STBTTPackRange callocStack()
Returns a newSTBTTPackRange
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static STBTTPackRange mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newSTBTTPackRange
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static STBTTPackRange callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newSTBTTPackRange
instance allocated on the specifiedMemoryStack
and 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.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static STBTTPackRange.Buffer callocStack(int capacity)
Returns a newSTBTTPackRange.Buffer
instance allocated on the thread-localMemoryStack
and 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.Buffer
instance 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.Buffer
instance allocated on the specifiedMemoryStack
and 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
-
-