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.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 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 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 aNkBakedFontinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionfloatascent()ascent(float value) Sets the specified value to theascentfield.static NkBakedFontcalloc()Returns a newNkBakedFontinstance allocated withmemCalloc.static NkBakedFont.Buffercalloc(int capacity) Returns a newNkBakedFont.Bufferinstance allocated withmemCalloc.static NkBakedFont.Buffercalloc(int capacity, MemoryStack stack) Returns a newNkBakedFont.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkBakedFontcalloc(MemoryStack stack) Returns a newNkBakedFontinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkBakedFontcreate()Returns a newNkBakedFontinstance allocated withBufferUtils.static NkBakedFont.Buffercreate(int capacity) Returns a newNkBakedFont.Bufferinstance allocated withBufferUtils.static NkBakedFontcreate(long address) Returns a newNkBakedFontinstance for the specified memory address.static NkBakedFont.Buffercreate(long address, int capacity) Create aNkBakedFont.Bufferinstance at the specified memory.static @Nullable NkBakedFontcreateSafe(long address) static @Nullable NkBakedFont.BuffercreateSafe(long address, int capacity) floatdescent()descent(float value) Sets the specified value to thedescentfield.intglyph_count(int value) Sets the specified value to theglyph_countfield.intglyph_offset(int value) Sets the specified value to theglyph_offsetfield.floatheight()height(float value) Sets the specified value to theheightfield.static NkBakedFontmalloc()Returns a newNkBakedFontinstance allocated withmemAlloc.static NkBakedFont.Buffermalloc(int capacity) Returns a newNkBakedFont.Bufferinstance allocated withmemAlloc.static NkBakedFont.Buffermalloc(int capacity, MemoryStack stack) Returns a newNkBakedFont.Bufferinstance allocated on the specifiedMemoryStack.static NkBakedFontmalloc(MemoryStack stack) Returns a newNkBakedFontinstance allocated on the specifiedMemoryStack.static floatnascent(long struct) Unsafe version ofascent().static voidnascent(long struct, float value) Unsafe version ofascent.static floatndescent(long struct) Unsafe version ofdescent().static voidndescent(long struct, float value) Unsafe version ofdescent.static intnglyph_count(long struct) Unsafe version ofglyph_count().static voidnglyph_count(long struct, int value) Unsafe version ofglyph_count.static intnglyph_offset(long struct) Unsafe version ofglyph_offset().static voidnglyph_offset(long struct, int value) Unsafe version ofglyph_offset.static floatnheight(long struct) Unsafe version ofheight().static voidnheight(long struct, float value) Unsafe version ofheight.static @Nullable IntBuffernranges(long struct, int capacity) Unsafe version ofranges.static voidUnsafe version ofranges.@Nullable IntBufferranges(int capacity) Sets the address of the specifiedIntBufferto therangesfield.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.intsizeof()Returnssizeof(struct).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. -
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 aNkBakedFontinstance 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<NkBakedFont>
-
height
public float height()- Returns:
- the value of the
heightfield.
-
ascent
public float ascent()- Returns:
- the value of the
ascentfield.
-
descent
public float descent()- Returns:
- the value of the
descentfield.
-
glyph_offset
public int glyph_offset()- Returns:
- the value of the
glyph_offsetfield.
-
glyph_count
public int glyph_count()- Returns:
- the value of the
glyph_countfield.
-
ranges
- Returns:
- a
IntBufferview of the data pointed to by therangesfield.
-
height
Sets the specified value to theheightfield. -
ascent
Sets the specified value to theascentfield. -
descent
Sets the specified value to thedescentfield. -
glyph_offset
Sets the specified value to theglyph_offsetfield. -
glyph_count
Sets the specified value to theglyph_countfield. -
ranges
Sets the address of the specifiedIntBufferto therangesfield. -
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 newNkBakedFontinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newNkBakedFontinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newNkBakedFontinstance allocated withBufferUtils. -
create
Returns a newNkBakedFontinstance for the specified memory address. -
createSafe
-
malloc
Returns a newNkBakedFont.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newNkBakedFont.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newNkBakedFont.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aNkBakedFont.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newNkBakedFontinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newNkBakedFontinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newNkBakedFont.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newNkBakedFont.Bufferinstance allocated on the specifiedMemoryStackand 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.
-