Package org.lwjgl.nuklear
Class NkBakedFont
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
struct nk_baked_font {
float height;
float ascent;
float descent;
nk_rune glyph_offset;
nk_rune glyph_count;
nk_rune const * ranges;
}
-
Nested Class Summary
Nested ClassesNested 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
FieldsModifier and TypeFieldDescriptionstatic final int
The struct alignment 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 size in bytes.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorsConstructorDescriptionNkBakedFont
(ByteBuffer container) Creates aNkBakedFont
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionfloat
ascent()
ascent
(float value) Sets the specified value to theascent
field.static NkBakedFont
calloc()
Returns a newNkBakedFont
instance allocated withmemCalloc
.static NkBakedFont.Buffer
calloc
(int capacity) Returns a newNkBakedFont.Buffer
instance allocated withmemCalloc
.static NkBakedFont.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newNkBakedFont.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static NkBakedFont
calloc
(MemoryStack stack) Returns a newNkBakedFont
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static NkBakedFont
create()
Returns a newNkBakedFont
instance allocated withBufferUtils
.static NkBakedFont.Buffer
create
(int capacity) Returns a newNkBakedFont.Buffer
instance allocated withBufferUtils
.static NkBakedFont
create
(long address) Returns a newNkBakedFont
instance for the specified memory address.static NkBakedFont.Buffer
create
(long address, int capacity) Create aNkBakedFont.Buffer
instance at the specified memory.static @Nullable NkBakedFont
createSafe
(long address) static @Nullable NkBakedFont.Buffer
createSafe
(long address, int capacity) float
descent()
descent
(float value) Sets the specified value to thedescent
field.int
glyph_count
(int value) Sets the specified value to theglyph_count
field.int
glyph_offset
(int value) Sets the specified value to theglyph_offset
field.float
height()
height
(float value) Sets the specified value to theheight
field.static NkBakedFont
malloc()
Returns a newNkBakedFont
instance allocated withmemAlloc
.static NkBakedFont.Buffer
malloc
(int capacity) Returns a newNkBakedFont.Buffer
instance allocated withmemAlloc
.static NkBakedFont.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newNkBakedFont.Buffer
instance allocated on the specifiedMemoryStack
.static NkBakedFont
malloc
(MemoryStack stack) Returns a newNkBakedFont
instance allocated on the specifiedMemoryStack
.static float
nascent
(long struct) Unsafe version ofascent()
.static void
nascent
(long struct, float value) Unsafe version ofascent
.static float
ndescent
(long struct) Unsafe version ofdescent()
.static void
ndescent
(long struct, float value) Unsafe version ofdescent
.static int
nglyph_count
(long struct) Unsafe version ofglyph_count()
.static void
nglyph_count
(long struct, int value) Unsafe version ofglyph_count
.static int
nglyph_offset
(long struct) Unsafe version ofglyph_offset()
.static void
nglyph_offset
(long struct, int value) Unsafe version ofglyph_offset
.static float
nheight
(long struct) Unsafe version ofheight()
.static void
nheight
(long struct, float value) Unsafe version ofheight
.static @Nullable IntBuffer
nranges
(long struct, int capacity) Unsafe version ofranges
.static void
Unsafe version ofranges
.@Nullable IntBuffer
ranges
(int capacity) Sets the address of the specifiedIntBuffer
to theranges
field.set
(float height, float ascent, float descent, int glyph_offset, int glyph_count, @Nullable IntBuffer ranges) Initializes this struct with the specified values.set
(NkBakedFont src) Copies the specified struct data to this struct.int
sizeof()
Returnssizeof(struct)
.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. -
HEIGHT
public static final int HEIGHTThe struct member offsets. -
ASCENT
public static final int ASCENTThe struct member offsets. -
DESCENT
public static final int DESCENTThe struct member offsets. -
GLYPH_OFFSET
public static final int GLYPH_OFFSETThe struct member offsets. -
GLYPH_COUNT
public static final int GLYPH_COUNTThe struct member offsets. -
RANGES
public static final int RANGESThe struct member offsets.
-
-
Constructor Details
-
NkBakedFont
Creates aNkBakedFont
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<NkBakedFont>
-
height
public float height()- Returns:
- the value of the
height
field.
-
ascent
public float ascent()- Returns:
- the value of the
ascent
field.
-
descent
public float descent()- Returns:
- the value of the
descent
field.
-
glyph_offset
public int glyph_offset()- Returns:
- the value of the
glyph_offset
field.
-
glyph_count
public int glyph_count()- Returns:
- the value of the
glyph_count
field.
-
ranges
- Returns:
- a
IntBuffer
view of the data pointed to by theranges
field.
-
height
Sets the specified value to theheight
field. -
ascent
Sets the specified value to theascent
field. -
descent
Sets the specified value to thedescent
field. -
glyph_offset
Sets the specified value to theglyph_offset
field. -
glyph_count
Sets the specified value to theglyph_count
field. -
ranges
Sets the address of the specifiedIntBuffer
to theranges
field. -
set
public NkBakedFont set(float height, float ascent, float descent, int glyph_offset, int glyph_count, @Nullable IntBuffer ranges) 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 newNkBakedFont
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newNkBakedFont
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newNkBakedFont
instance allocated withBufferUtils
. -
create
Returns a newNkBakedFont
instance for the specified memory address. -
createSafe
-
malloc
Returns a newNkBakedFont.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newNkBakedFont.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newNkBakedFont.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aNkBakedFont.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
malloc
Returns a newNkBakedFont
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newNkBakedFont
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newNkBakedFont.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newNkBakedFont.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
nheight
public static float nheight(long struct) Unsafe version ofheight()
. -
nascent
public static float nascent(long struct) Unsafe version ofascent()
. -
ndescent
public static float ndescent(long struct) Unsafe version ofdescent()
. -
nglyph_offset
public static int nglyph_offset(long struct) Unsafe version ofglyph_offset()
. -
nglyph_count
public static int nglyph_count(long struct) Unsafe version ofglyph_count()
. -
nranges
Unsafe version ofranges
. -
nheight
public static void nheight(long struct, float value) Unsafe version ofheight
. -
nascent
public static void nascent(long struct, float value) Unsafe version ofascent
. -
ndescent
public static void ndescent(long struct, float value) Unsafe version ofdescent
. -
nglyph_offset
public static void nglyph_offset(long struct, int value) Unsafe version ofglyph_offset
. -
nglyph_count
public static void nglyph_count(long struct, int value) Unsafe version ofglyph_count
. -
nranges
Unsafe version ofranges
.
-