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
– outputh_oversample
– used internallyv_oversample
– used internally
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.static STBTTPackRange.Buffer
create(long address, int capacity)
Create aSTBTTPackRange.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 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.byte
h_oversample()
Returns the value of theh_oversample
field.STBTTPackRange
h_oversample(byte value)
Sets the specified value to theh_oversample
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
.int
num_chars()
Returns the value of thenum_chars
field.STBTTPackRange
num_chars(int value)
Sets the specified value to thenum_chars
field.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 thev_oversample
field.STBTTPackRange
v_oversample(byte value)
Sets the specified value to thev_oversample
field.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()
- 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
@Nullable 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.
-
h_oversample
public byte h_oversample()
Returns the value of theh_oversample
field.
-
v_oversample
public byte v_oversample()
Returns the value of thev_oversample
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(@Nullable 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.
-
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, 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 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.
-
createSafe
@Nullable public static STBTTPackRange createSafe(long address)
-
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
-
createSafe
@Nullable public static STBTTPackRange.Buffer createSafe(long address, int 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
-
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
-
-