Package org.lwjgl.stb
Class STBTTPackedchar
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.stb.STBTTPackedchar
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class STBTTPackedchar extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourcePacked character data, returned byPackFontRangeLayout
struct stbtt_packedchar { unsigned short x0; unsigned short y0; unsigned short x1; unsigned short y1; float xoff; float yoff; float xadvance; float xoff2; float yoff2; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSTBTTPackedchar.BufferAn array ofSTBTTPackedcharstructs.
-
Constructor Summary
Constructors Constructor Description STBTTPackedchar(java.nio.ByteBuffer container)Creates aSTBTTPackedcharinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static STBTTPackedcharcalloc()Returns a newSTBTTPackedcharinstance allocated withmemCalloc.static STBTTPackedchar.Buffercalloc(int capacity)Returns a newSTBTTPackedchar.Bufferinstance allocated withmemCalloc.static STBTTPackedcharcallocStack()Returns a newSTBTTPackedcharinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static STBTTPackedchar.BuffercallocStack(int capacity)Returns a newSTBTTPackedchar.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static STBTTPackedchar.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newSTBTTPackedchar.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static STBTTPackedcharcallocStack(org.lwjgl.system.MemoryStack stack)Returns a newSTBTTPackedcharinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static STBTTPackedcharcreate()Returns a newSTBTTPackedcharinstance allocated withBufferUtils.static STBTTPackedchar.Buffercreate(int capacity)Returns a newSTBTTPackedchar.Bufferinstance allocated withBufferUtils.static STBTTPackedcharcreate(long address)Returns a newSTBTTPackedcharinstance for the specified memory address.static STBTTPackedchar.Buffercreate(long address, int capacity)Create aSTBTTPackedchar.Bufferinstance at the specified memory.static STBTTPackedcharcreateSafe(long address)static STBTTPackedchar.BuffercreateSafe(long address, int capacity)static STBTTPackedcharmalloc()Returns a newSTBTTPackedcharinstance allocated withmemAlloc.static STBTTPackedchar.Buffermalloc(int capacity)Returns a newSTBTTPackedchar.Bufferinstance allocated withmemAlloc.static STBTTPackedcharmallocStack()Returns a newSTBTTPackedcharinstance allocated on the thread-localMemoryStack.static STBTTPackedchar.BuffermallocStack(int capacity)Returns a newSTBTTPackedchar.Bufferinstance allocated on the thread-localMemoryStack.static STBTTPackedchar.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newSTBTTPackedchar.Bufferinstance allocated on the specifiedMemoryStack.static STBTTPackedcharmallocStack(org.lwjgl.system.MemoryStack stack)Returns a newSTBTTPackedcharinstance allocated on the specifiedMemoryStack.static shortnx0(long struct)Unsafe version ofx0().static voidnx0(long struct, short value)Unsafe version ofx0.static shortnx1(long struct)Unsafe version ofx1().static voidnx1(long struct, short value)Unsafe version ofx1.static floatnxadvance(long struct)Unsafe version ofxadvance().static voidnxadvance(long struct, float value)Unsafe version ofxadvance.static floatnxoff(long struct)Unsafe version ofxoff().static voidnxoff(long struct, float value)Unsafe version ofxoff.static floatnxoff2(long struct)Unsafe version ofxoff2().static voidnxoff2(long struct, float value)Unsafe version ofxoff2.static shortny0(long struct)Unsafe version ofy0().static voidny0(long struct, short value)Unsafe version ofy0.static shortny1(long struct)Unsafe version ofy1().static voidny1(long struct, short value)Unsafe version ofy1.static floatnyoff(long struct)Unsafe version ofyoff().static voidnyoff(long struct, float value)Unsafe version ofyoff.static floatnyoff2(long struct)Unsafe version ofyoff2().static voidnyoff2(long struct, float value)Unsafe version ofyoff2.STBTTPackedcharset(short x0, short y0, short x1, short y1, float xoff, float yoff, float xadvance, float xoff2, float yoff2)Initializes this struct with the specified values.STBTTPackedcharset(STBTTPackedchar src)Copies the specified struct data to this struct.intsizeof()shortx0()Returns the value of thex0field.STBTTPackedcharx0(short value)Sets the specified value to thex0field.shortx1()Returns the value of thex1field.STBTTPackedcharx1(short value)Sets the specified value to thex1field.floatxadvance()Returns the value of thexadvancefield.STBTTPackedcharxadvance(float value)Sets the specified value to thexadvancefield.floatxoff()Returns the value of thexofffield.STBTTPackedcharxoff(float value)Sets the specified value to thexofffield.floatxoff2()Returns the value of thexoff2field.STBTTPackedcharxoff2(float value)Sets the specified value to thexoff2field.shorty0()Returns the value of they0field.STBTTPackedchary0(short value)Sets the specified value to they0field.shorty1()Returns the value of they1field.STBTTPackedchary1(short value)Sets the specified value to they1field.floatyoff()Returns the value of theyofffield.STBTTPackedcharyoff(float value)Sets the specified value to theyofffield.floatyoff2()Returns the value of theyoff2field.STBTTPackedcharyoff2(float value)Sets the specified value to theyoff2field.
-
-
-
Constructor Detail
-
STBTTPackedchar
public STBTTPackedchar(java.nio.ByteBuffer container)
Creates aSTBTTPackedcharinstance 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
-
x0
public short x0()
Returns the value of thex0field.
-
y0
public short y0()
Returns the value of they0field.
-
x1
public short x1()
Returns the value of thex1field.
-
y1
public short y1()
Returns the value of they1field.
-
xoff
public float xoff()
Returns the value of thexofffield.
-
yoff
public float yoff()
Returns the value of theyofffield.
-
xadvance
public float xadvance()
Returns the value of thexadvancefield.
-
xoff2
public float xoff2()
Returns the value of thexoff2field.
-
yoff2
public float yoff2()
Returns the value of theyoff2field.
-
x0
public STBTTPackedchar x0(short value)
Sets the specified value to thex0field.
-
y0
public STBTTPackedchar y0(short value)
Sets the specified value to they0field.
-
x1
public STBTTPackedchar x1(short value)
Sets the specified value to thex1field.
-
y1
public STBTTPackedchar y1(short value)
Sets the specified value to they1field.
-
xoff
public STBTTPackedchar xoff(float value)
Sets the specified value to thexofffield.
-
yoff
public STBTTPackedchar yoff(float value)
Sets the specified value to theyofffield.
-
xadvance
public STBTTPackedchar xadvance(float value)
Sets the specified value to thexadvancefield.
-
xoff2
public STBTTPackedchar xoff2(float value)
Sets the specified value to thexoff2field.
-
yoff2
public STBTTPackedchar yoff2(float value)
Sets the specified value to theyoff2field.
-
set
public STBTTPackedchar set(short x0, short y0, short x1, short y1, float xoff, float yoff, float xadvance, float xoff2, float yoff2)
Initializes this struct with the specified values.
-
set
public STBTTPackedchar set(STBTTPackedchar src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static STBTTPackedchar malloc()
Returns a newSTBTTPackedcharinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static STBTTPackedchar calloc()
Returns a newSTBTTPackedcharinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static STBTTPackedchar create()
Returns a newSTBTTPackedcharinstance allocated withBufferUtils.
-
create
public static STBTTPackedchar create(long address)
Returns a newSTBTTPackedcharinstance for the specified memory address.
-
createSafe
@Nullable public static STBTTPackedchar createSafe(long address)
-
malloc
public static STBTTPackedchar.Buffer malloc(int capacity)
Returns a newSTBTTPackedchar.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static STBTTPackedchar.Buffer calloc(int capacity)
Returns a newSTBTTPackedchar.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static STBTTPackedchar.Buffer create(int capacity)
Returns a newSTBTTPackedchar.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static STBTTPackedchar.Buffer create(long address, int capacity)
Create aSTBTTPackedchar.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static STBTTPackedchar.Buffer createSafe(long address, int capacity)
-
mallocStack
public static STBTTPackedchar mallocStack()
Returns a newSTBTTPackedcharinstance allocated on the thread-localMemoryStack.
-
callocStack
public static STBTTPackedchar callocStack()
Returns a newSTBTTPackedcharinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static STBTTPackedchar mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newSTBTTPackedcharinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static STBTTPackedchar callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newSTBTTPackedcharinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static STBTTPackedchar.Buffer mallocStack(int capacity)
Returns a newSTBTTPackedchar.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static STBTTPackedchar.Buffer callocStack(int capacity)
Returns a newSTBTTPackedchar.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static STBTTPackedchar.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newSTBTTPackedchar.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static STBTTPackedchar.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newSTBTTPackedchar.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nx0
public static short nx0(long struct)
Unsafe version ofx0().
-
ny0
public static short ny0(long struct)
Unsafe version ofy0().
-
nx1
public static short nx1(long struct)
Unsafe version ofx1().
-
ny1
public static short ny1(long struct)
Unsafe version ofy1().
-
nxoff
public static float nxoff(long struct)
Unsafe version ofxoff().
-
nyoff
public static float nyoff(long struct)
Unsafe version ofyoff().
-
nxadvance
public static float nxadvance(long struct)
Unsafe version ofxadvance().
-
nxoff2
public static float nxoff2(long struct)
Unsafe version ofxoff2().
-
nyoff2
public static float nyoff2(long struct)
Unsafe version ofyoff2().
-
nx0
public static void nx0(long struct, short value)Unsafe version ofx0.
-
ny0
public static void ny0(long struct, short value)Unsafe version ofy0.
-
nx1
public static void nx1(long struct, short value)Unsafe version ofx1.
-
ny1
public static void ny1(long struct, short value)Unsafe version ofy1.
-
nxoff
public static void nxoff(long struct, float value)Unsafe version ofxoff.
-
nyoff
public static void nyoff(long struct, float value)Unsafe version ofyoff.
-
nxadvance
public static void nxadvance(long struct, float value)Unsafe version ofxadvance.
-
nxoff2
public static void nxoff2(long struct, float value)Unsafe version ofxoff2.
-
nyoff2
public static void nyoff2(long struct, float value)Unsafe version ofyoff2.
-
-