Package org.lwjgl.stb
Class STBTTPackedchar
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
Packed character data, returned by
PackFontRange
Layout
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/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct size in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorDescriptionSTBTTPackedchar
(ByteBuffer container) Creates aSTBTTPackedchar
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic STBTTPackedchar
calloc()
Returns a newSTBTTPackedchar
instance allocated withmemCalloc
.static STBTTPackedchar.Buffer
calloc
(int capacity) Returns a newSTBTTPackedchar.Buffer
instance allocated withmemCalloc
.static STBTTPackedchar.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newSTBTTPackedchar.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static STBTTPackedchar
calloc
(MemoryStack stack) Returns a newSTBTTPackedchar
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static STBTTPackedchar
Deprecated.static STBTTPackedchar.Buffer
callocStack
(int capacity) Deprecated.static STBTTPackedchar.Buffer
callocStack
(int capacity, MemoryStack stack) Deprecated.static STBTTPackedchar
callocStack
(MemoryStack stack) Deprecated.static STBTTPackedchar
create()
Returns a newSTBTTPackedchar
instance allocated withBufferUtils
.static STBTTPackedchar.Buffer
create
(int capacity) Returns a newSTBTTPackedchar.Buffer
instance allocated withBufferUtils
.static STBTTPackedchar
create
(long address) Returns a newSTBTTPackedchar
instance for the specified memory address.static STBTTPackedchar.Buffer
create
(long address, int capacity) Create aSTBTTPackedchar.Buffer
instance at the specified memory.static STBTTPackedchar
createSafe
(long address) static STBTTPackedchar.Buffer
createSafe
(long address, int capacity) static STBTTPackedchar
malloc()
Returns a newSTBTTPackedchar
instance allocated withmemAlloc
.static STBTTPackedchar.Buffer
malloc
(int capacity) Returns a newSTBTTPackedchar.Buffer
instance allocated withmemAlloc
.static STBTTPackedchar.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newSTBTTPackedchar.Buffer
instance allocated on the specifiedMemoryStack
.static STBTTPackedchar
malloc
(MemoryStack stack) Returns a newSTBTTPackedchar
instance allocated on the specifiedMemoryStack
.static STBTTPackedchar
Deprecated.static STBTTPackedchar.Buffer
mallocStack
(int capacity) Deprecated.static STBTTPackedchar.Buffer
mallocStack
(int capacity, MemoryStack stack) Deprecated.static STBTTPackedchar
mallocStack
(MemoryStack stack) Deprecated.static short
nx0
(long struct) Unsafe version ofx0()
.static void
nx0
(long struct, short value) Unsafe version ofx0
.static short
nx1
(long struct) Unsafe version ofx1()
.static void
nx1
(long struct, short value) Unsafe version ofx1
.static float
nxadvance
(long struct) Unsafe version ofxadvance()
.static void
nxadvance
(long struct, float value) Unsafe version ofxadvance
.static float
nxoff
(long struct) Unsafe version ofxoff()
.static void
nxoff
(long struct, float value) Unsafe version ofxoff
.static float
nxoff2
(long struct) Unsafe version ofxoff2()
.static void
nxoff2
(long struct, float value) Unsafe version ofxoff2
.static short
ny0
(long struct) Unsafe version ofy0()
.static void
ny0
(long struct, short value) Unsafe version ofy0
.static short
ny1
(long struct) Unsafe version ofy1()
.static void
ny1
(long struct, short value) Unsafe version ofy1
.static float
nyoff
(long struct) Unsafe version ofyoff()
.static void
nyoff
(long struct, float value) Unsafe version ofyoff
.static float
nyoff2
(long struct) Unsafe version ofyoff2()
.static void
nyoff2
(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.int
sizeof()
Returnssizeof(struct)
.short
x0()
x0
(short value) Sets the specified value to thex0
field.short
x1()
x1
(short value) Sets the specified value to thex1
field.float
xadvance()
xadvance
(float value) Sets the specified value to thexadvance
field.float
xoff()
xoff
(float value) Sets the specified value to thexoff
field.float
xoff2()
xoff2
(float value) Sets the specified value to thexoff2
field.short
y0()
y0
(short value) Sets the specified value to they0
field.short
y1()
y1
(short value) Sets the specified value to they1
field.float
yoff()
yoff
(float value) Sets the specified value to theyoff
field.float
yoff2()
yoff2
(float value) Sets the specified value to theyoff2
field.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods 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 aSTBTTPackedchar
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 Details
-
sizeof
public int sizeof()Description copied from class:Struct
Returnssizeof(struct)
.- Specified by:
sizeof
in classStruct<STBTTPackedchar>
-
x0
public short x0()- Returns:
- the value of the
x0
field.
-
y0
public short y0()- Returns:
- the value of the
y0
field.
-
x1
public short x1()- Returns:
- the value of the
x1
field.
-
y1
public short y1()- Returns:
- the value of the
y1
field.
-
xoff
public float xoff()- Returns:
- the value of the
xoff
field.
-
yoff
public float yoff()- Returns:
- the value of the
yoff
field.
-
xadvance
public float xadvance()- Returns:
- the value of the
xadvance
field.
-
xoff2
public float xoff2()- Returns:
- the value of the
xoff2
field.
-
yoff2
public float yoff2()- Returns:
- the value of the
yoff2
field.
-
x0
Sets the specified value to thex0
field. -
y0
Sets the specified value to they0
field. -
x1
Sets the specified value to thex1
field. -
y1
Sets the specified value to they1
field. -
xoff
Sets the specified value to thexoff
field. -
yoff
Sets the specified value to theyoff
field. -
xadvance
Sets the specified value to thexadvance
field. -
xoff2
Sets the specified value to thexoff2
field. -
yoff2
Sets the specified value to theyoff2
field. -
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 newSTBTTPackedchar
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newSTBTTPackedchar
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newSTBTTPackedchar
instance allocated withBufferUtils
. -
create
Returns a newSTBTTPackedchar
instance for the specified memory address. -
createSafe
-
malloc
Returns a newSTBTTPackedchar.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newSTBTTPackedchar.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newSTBTTPackedchar.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aSTBTTPackedchar.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
malloc
Returns a newSTBTTPackedchar
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newSTBTTPackedchar
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newSTBTTPackedchar.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newSTBTTPackedchar.Buffer
instance allocated on the specifiedMemoryStack
and 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
.
-