Package org.lwjgl.nuklear
Class NkBakedFont
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<NkBakedFont>
org.lwjgl.nuklear.NkBakedFont
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class NkBakedFont
extends org.lwjgl.system.Struct<NkBakedFont>
implements org.lwjgl.system.NativeResource
Layout
struct nk_baked_font {
float height();
float ascent();
float descent();
nk_rune glyph_offset();
nk_rune glyph_count();
nk_rune const * ranges(int);
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.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()font glyph ascentascent(float value) Sets the specified value to theascent()field.static NkBakedFontcalloc()Returns a newNkBakedFontinstance allocated withmemCalloc.static NkBakedFont.Buffercalloc(int capacity) Returns a newNkBakedFont.Bufferinstance allocated withmemCalloc.static NkBakedFont.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newNkBakedFont.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkBakedFontcalloc(org.lwjgl.system.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()font glyph descentdescent(float value) Sets the specified value to thedescent()field.intnumber of glyphs of this font inside the glyph baking array outputglyph_count(int value) Sets the specified value to theglyph_count()field.intglyph array offset inside the font glyph baking output arrayglyph_offset(int value) Sets the specified value to theglyph_offset()field.floatheight()height of the fontheight(float value) Sets the specified value to theheight()field.static NkBakedFontmalloc()Returns a newNkBakedFontinstance allocated withmemAlloc.static NkBakedFont.Buffermalloc(int capacity) Returns a newNkBakedFont.Bufferinstance allocated withmemAlloc.static NkBakedFont.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newNkBakedFont.Bufferinstance allocated on the specifiedMemoryStack.static NkBakedFontmalloc(org.lwjgl.system.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 theranges(int)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.intsizeof()Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods 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()- Specified by:
sizeofin classorg.lwjgl.system.Struct<NkBakedFont>
-
height
public float height()height of the font -
ascent
public float ascent()font glyph ascent -
descent
public float descent()font glyph descent -
glyph_offset
public int glyph_offset()glyph array offset inside the font glyph baking output array -
glyph_count
public int glyph_count()number of glyphs of this font inside the glyph baking array output -
ranges
- Parameters:
capacity- the number of elements in the returned buffer- Returns:
- font codepoint ranges as pairs of (from/to) and 0 as last element
-
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 specifiedIntBufferto theranges(int)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 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.
-