Package org.lwjgl.stb
Class STBTTPackedchar
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
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 ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct size in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionSTBTTPackedchar(ByteBuffer container) Creates aSTBTTPackedcharinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic STBTTPackedcharcalloc()Returns a newSTBTTPackedcharinstance allocated withmemCalloc.static STBTTPackedchar.Buffercalloc(int capacity) Returns a newSTBTTPackedchar.Bufferinstance allocated withmemCalloc.static STBTTPackedchar.Buffercalloc(int capacity, MemoryStack stack) Returns a newSTBTTPackedchar.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static STBTTPackedcharcalloc(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 @Nullable STBTTPackedcharcreateSafe(long address) static @Nullable 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 STBTTPackedchar.Buffermalloc(int capacity, MemoryStack stack) Returns a newSTBTTPackedchar.Bufferinstance allocated on the specifiedMemoryStack.static STBTTPackedcharmalloc(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.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(STBTTPackedchar src) Copies the specified struct data to this struct.intsizeof()Returnssizeof(struct).shortx0()x0(short value) Sets the specified value to thex0field.shortx1()x1(short value) Sets the specified value to thex1field.floatxadvance()xadvance(float value) Sets the specified value to thexadvancefield.floatxoff()xoff(float value) Sets the specified value to thexofffield.floatxoff2()xoff2(float value) Sets the specified value to thexoff2field.shorty0()y0(short value) Sets the specified value to they0field.shorty1()y1(short value) Sets the specified value to they1field.floatyoff()yoff(float value) Sets the specified value to theyofffield.floatyoff2()yoff2(float value) Sets the specified value to theyoff2field.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
X0
public static final int X0The struct member offsets. -
Y0
public static final int Y0The struct member offsets. -
X1
public static final int X1The struct member offsets. -
Y1
public static final int Y1The struct member offsets. -
XOFF
public static final int XOFFThe struct member offsets. -
YOFF
public static final int YOFFThe struct member offsets. -
XADVANCE
public static final int XADVANCEThe struct member offsets. -
XOFF2
public static final int XOFF2The struct member offsets. -
YOFF2
public static final int YOFF2The struct member offsets.
-
-
Constructor Details
-
STBTTPackedchar
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 Details
-
sizeof
public int sizeof()Description copied from class:StructReturnssizeof(struct).- Specified by:
sizeofin classStruct<STBTTPackedchar>
-
x0
public short x0()- Returns:
- the value of the
x0field.
-
y0
public short y0()- Returns:
- the value of the
y0field.
-
x1
public short x1()- Returns:
- the value of the
x1field.
-
y1
public short y1()- Returns:
- the value of the
y1field.
-
xoff
public float xoff()- Returns:
- the value of the
xofffield.
-
yoff
public float yoff()- Returns:
- the value of the
yofffield.
-
xadvance
public float xadvance()- Returns:
- the value of the
xadvancefield.
-
xoff2
public float xoff2()- Returns:
- the value of the
xoff2field.
-
yoff2
public float yoff2()- Returns:
- the value of the
yoff2field.
-
x0
Sets the specified value to thex0field. -
y0
Sets the specified value to they0field. -
x1
Sets the specified value to thex1field. -
y1
Sets the specified value to they1field. -
xoff
Sets the specified value to thexofffield. -
yoff
Sets the specified value to theyofffield. -
xadvance
Sets the specified value to thexadvancefield. -
xoff2
Sets the specified value to thexoff2field. -
yoff2
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
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newSTBTTPackedcharinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newSTBTTPackedcharinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newSTBTTPackedcharinstance allocated withBufferUtils. -
create
Returns a newSTBTTPackedcharinstance for the specified memory address. -
createSafe
-
malloc
Returns a newSTBTTPackedchar.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newSTBTTPackedchar.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newSTBTTPackedchar.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aSTBTTPackedchar.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newSTBTTPackedcharinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newSTBTTPackedcharinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newSTBTTPackedchar.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newSTBTTPackedchar.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
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.
-