Package org.lwjgl.stb
Class STBTTBakedChar
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
Baked character data, returned by
BakeFontBitmap
.
Layout
struct stbtt_bakedchar {
unsigned short x0;
unsigned short y0;
unsigned short x1;
unsigned short y1;
float xoff;
float yoff;
float xadvance;
}
-
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.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorDescriptionSTBTTBakedChar
(ByteBuffer container) Creates aSTBTTBakedChar
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic STBTTBakedChar
calloc()
Returns a newSTBTTBakedChar
instance allocated withmemCalloc
.static STBTTBakedChar.Buffer
calloc
(int capacity) Returns a newSTBTTBakedChar.Buffer
instance allocated withmemCalloc
.static STBTTBakedChar.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newSTBTTBakedChar.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static STBTTBakedChar
calloc
(MemoryStack stack) Returns a newSTBTTBakedChar
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static STBTTBakedChar
Deprecated.static STBTTBakedChar.Buffer
callocStack
(int capacity) Deprecated.static STBTTBakedChar.Buffer
callocStack
(int capacity, MemoryStack stack) Deprecated.static STBTTBakedChar
callocStack
(MemoryStack stack) Deprecated.static STBTTBakedChar
create()
Returns a newSTBTTBakedChar
instance allocated withBufferUtils
.static STBTTBakedChar.Buffer
create
(int capacity) Returns a newSTBTTBakedChar.Buffer
instance allocated withBufferUtils
.static STBTTBakedChar
create
(long address) Returns a newSTBTTBakedChar
instance for the specified memory address.static STBTTBakedChar.Buffer
create
(long address, int capacity) Create aSTBTTBakedChar.Buffer
instance at the specified memory.static STBTTBakedChar
createSafe
(long address) static STBTTBakedChar.Buffer
createSafe
(long address, int capacity) static STBTTBakedChar
malloc()
Returns a newSTBTTBakedChar
instance allocated withmemAlloc
.static STBTTBakedChar.Buffer
malloc
(int capacity) Returns a newSTBTTBakedChar.Buffer
instance allocated withmemAlloc
.static STBTTBakedChar.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newSTBTTBakedChar.Buffer
instance allocated on the specifiedMemoryStack
.static STBTTBakedChar
malloc
(MemoryStack stack) Returns a newSTBTTBakedChar
instance allocated on the specifiedMemoryStack
.static STBTTBakedChar
Deprecated.static STBTTBakedChar.Buffer
mallocStack
(int capacity) Deprecated.static STBTTBakedChar.Buffer
mallocStack
(int capacity, MemoryStack stack) Deprecated.static STBTTBakedChar
mallocStack
(MemoryStack stack) Deprecated.static short
nx0
(long struct) Unsafe version ofx0()
.static short
nx1
(long struct) Unsafe version ofx1()
.static float
nxadvance
(long struct) Unsafe version ofxadvance()
.static float
nxoff
(long struct) Unsafe version ofxoff()
.static short
ny0
(long struct) Unsafe version ofy0()
.static short
ny1
(long struct) Unsafe version ofy1()
.static float
nyoff
(long struct) Unsafe version ofyoff()
.int
sizeof()
Returnssizeof(struct)
.short
x0()
short
x1()
float
xadvance()
float
xoff()
short
y0()
short
y1()
float
yoff()
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.
-
-
Constructor Details
-
STBTTBakedChar
Creates aSTBTTBakedChar
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<STBTTBakedChar>
-
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.
-
malloc
Returns a newSTBTTBakedChar
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newSTBTTBakedChar
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newSTBTTBakedChar
instance allocated withBufferUtils
. -
create
Returns a newSTBTTBakedChar
instance for the specified memory address. -
createSafe
-
malloc
Returns a newSTBTTBakedChar.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newSTBTTBakedChar.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newSTBTTBakedChar.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aSTBTTBakedChar.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 newSTBTTBakedChar
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newSTBTTBakedChar
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newSTBTTBakedChar.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newSTBTTBakedChar.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()
.
-