Top Description Inners Fields Constructors Methods
org.lwjgl.nuklear

public Class NkBakedFont

extends Struct<NkBakedFont>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable
Annotations
@NativeType:struct nk_baked_font
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

Layout


struct nk_baked_font {
    float height;
    float ascent;
    float descent;
    nk_rune glyph_offset;
    nk_rune glyph_count;
    nk_rune const * ranges;
}

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
NkBakedFont.Buffer

An array of NkBakedFont structs.

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
ASCENT

The struct member offsets.

public static final int
DESCENT

The struct member offsets.

public static final int
GLYPH_COUNT

The struct member offsets.

public static final int
GLYPH_OFFSET

The struct member offsets.

public static final int
HEIGHT

The struct member offsets.

public static final int
RANGES

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

AccessConstructor and Description
protected
NkBakedFont(long address, ByteBuffer container)

public
NkBakedFont(ByteBuffer container)

Creates a NkBakedFont instance at the current position of the specified ByteBuffer container.

Method Summary

Modifier and TypeMethod and Description
public float
ascent()

font glyph ascent

public NkBakedFont
ascent(float value)

Sets the specified value to the ascent field.

public static NkBakedFont
calloc()

Returns a new NkBakedFont instance allocated with memCalloc.

public static NkBakedFont.Buffer
calloc(int
the buffer capacity
capacity
)

Returns a new NkBakedFont.Buffer instance allocated with memCalloc.

public static NkBakedFont
calloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new NkBakedFont instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static NkBakedFont.Buffer
calloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new NkBakedFont.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

protected NkBakedFont
create(long
the struct memory address
address
,
ByteBuffer
an optional container buffer, to be referenced strongly by the struct instance.
container
)

Implements abstract org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.
public static NkBakedFont
create()

Returns a new NkBakedFont instance allocated with BufferUtils.

public static NkBakedFont
create(long address)

Returns a new NkBakedFont instance for the specified memory address.

public static NkBakedFont.Buffer
create(int
the buffer capacity
capacity
)

Returns a new NkBakedFont.Buffer instance allocated with BufferUtils.

public static NkBakedFont.Buffer
create(long
the memory address
address
,
int
the buffer capacity
capacity
)

Create a NkBakedFont.Buffer instance at the specified memory.

public static NkBakedFont
createSafe(long address)

Like create, but returns null if address is NULL.

public static NkBakedFont.Buffer
createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

public float
descent()

font glyph descent

public NkBakedFont
descent(float value)

Sets the specified value to the descent field.

public int
glyph_count()

number of glyphs of this font inside the glyph baking array output

public NkBakedFont
glyph_count(int value)

Sets the specified value to the glyph_count field.

public int
glyph_offset()

glyph array offset inside the font glyph baking output array

public NkBakedFont
glyph_offset(int value)

Sets the specified value to the glyph_offset field.

public float
height()

height of the font

public NkBakedFont
height(float value)

Sets the specified value to the height field.

public static NkBakedFont
malloc()

Returns a new NkBakedFont instance allocated with memAlloc.

public static NkBakedFont.Buffer
malloc(int
the buffer capacity
capacity
)

Returns a new NkBakedFont.Buffer instance allocated with memAlloc.

public static NkBakedFont
malloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new NkBakedFont instance allocated on the specified MemoryStack.

public static NkBakedFont.Buffer
malloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new NkBakedFont.Buffer instance allocated on the specified MemoryStack.

public static float
nascent(long struct)

Unsafe version of ascent.

public static void
nascent(long struct, float value)

Unsafe version of ascent.

public static float
ndescent(long struct)

Unsafe version of descent.

public static void
ndescent(long struct, float value)

Unsafe version of descent.

public static int
nglyph_count(long struct)

Unsafe version of glyph_count.

public static void
nglyph_count(long struct, int value)

Unsafe version of glyph_count.

public static int
nglyph_offset(long struct)

Unsafe version of glyph_offset.

public static void
nglyph_offset(long struct, int value)

Unsafe version of glyph_offset.

public static float
nheight(long struct)

Unsafe version of height.

public static void
nheight(long struct, float value)

Unsafe version of height.

public static IntBuffer
nranges(long struct, int capacity)

Unsafe version of ranges.

public static void
nranges(long struct, IntBuffer value)

Unsafe version of ranges.

public IntBuffer

Returns:

font codepoint ranges as pairs of (from/to) and 0 as last element
ranges
(int
the number of elements in the returned buffer
capacity
)

public NkBakedFont
ranges(IntBuffer value)

Sets the address of the specified IntBuffer to the ranges field.

public NkBakedFont
set(float height, float ascent, float descent, int glyph_offset, int glyph_count, IntBuffer ranges)

Initializes this struct with the specified values.

public NkBakedFont

Returns:

this struct
set
(NkBakedFont
the source struct
src
)

Copies the specified struct data to this struct.

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate

Field Detail

ALIGNOFback to summary
public static final int ALIGNOF

The struct alignment in bytes.

ASCENTback to summary
public static final int ASCENT

The struct member offsets.

DESCENTback to summary
public static final int DESCENT

The struct member offsets.

GLYPH_COUNTback to summary
public static final int GLYPH_COUNT

The struct member offsets.

GLYPH_OFFSETback to summary
public static final int GLYPH_OFFSET

The struct member offsets.

HEIGHTback to summary
public static final int HEIGHT

The struct member offsets.

RANGESback to summary
public static final int RANGES

The struct member offsets.

SIZEOFback to summary
public static final int SIZEOF

The struct size in bytes.

Constructor Detail

NkBakedFontback to summary
protected NkBakedFont(long address, ByteBuffer container)
NkBakedFontback to summary
public NkBakedFont(ByteBuffer container)

Creates a NkBakedFont instance at the current position of the specified ByteBuffer 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 Detail

ascentback to summary
public float ascent()

font glyph ascent

ascentback to summary
public NkBakedFont ascent(float value)

Sets the specified value to the ascent field.

callocback to summary
public static NkBakedFont calloc()

Returns a new NkBakedFont instance allocated with memCalloc. The instance must be explicitly freed.

callocback to summary
public static NkBakedFont.Buffer calloc(int capacity)

Returns a new NkBakedFont.Buffer instance allocated with memCalloc. The instance must be explicitly freed.

Parameters
capacity:int

the buffer capacity

callocback to summary
public static NkBakedFont calloc(MemoryStack stack)

Returns a new NkBakedFont instance allocated on the specified MemoryStack and initializes all its bits to zero.

Parameters
stack:MemoryStack

the stack from which to allocate

callocback to summary
public static NkBakedFont.Buffer calloc(int capacity, MemoryStack stack)

Returns a new NkBakedFont.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

createback to summary
protected NkBakedFont create(long address, ByteBuffer container)

Implements abstract org.lwjgl.system.Struct.create.

Doc from org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.

Effectively, every Struct instance is a factory for more instances of the same type. This is used by StructBuffer.

Parameters
address:long

the struct memory address

container:ByteBuffer

an optional container buffer, to be referenced strongly by the struct instance.

Annotations
@Override
createback to summary
public static NkBakedFont create()

Returns a new NkBakedFont instance allocated with BufferUtils.

createback to summary
public static NkBakedFont create(long address)

Returns a new NkBakedFont instance for the specified memory address.

createback to summary
public static NkBakedFont.Buffer create(int capacity)

Returns a new NkBakedFont.Buffer instance allocated with BufferUtils.

Parameters
capacity:int

the buffer capacity

createback to summary
public static NkBakedFont.Buffer create(long address, int capacity)

Create a NkBakedFont.Buffer instance at the specified memory.

Parameters
address:long

the memory address

capacity:int

the buffer capacity

createSafeback to summary
public static NkBakedFont createSafe(long address)

Like create, but returns null if address is NULL.

Annotations
@Nullable
createSafeback to summary
public static NkBakedFont.Buffer createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

Annotations
@Nullable
descentback to summary
public float descent()

font glyph descent

descentback to summary
public NkBakedFont descent(float value)

Sets the specified value to the descent field.

glyph_countback to summary
public int glyph_count()

number of glyphs of this font inside the glyph baking array output

Annotations
@NativeType:nk_rune
glyph_countback to summary
public NkBakedFont glyph_count(int value)

Sets the specified value to the glyph_count field.

glyph_offsetback to summary
public int glyph_offset()

glyph array offset inside the font glyph baking output array

Annotations
@NativeType:nk_rune
glyph_offsetback to summary
public NkBakedFont glyph_offset(int value)

Sets the specified value to the glyph_offset field.

heightback to summary
public float height()

height of the font

heightback to summary
public NkBakedFont height(float value)

Sets the specified value to the height field.

mallocback to summary
public static NkBakedFont malloc()

Returns a new NkBakedFont instance allocated with memAlloc. The instance must be explicitly freed.

mallocback to summary
public static NkBakedFont.Buffer malloc(int capacity)

Returns a new NkBakedFont.Buffer instance allocated with memAlloc. The instance must be explicitly freed.

Parameters
capacity:int

the buffer capacity

mallocback to summary
public static NkBakedFont malloc(MemoryStack stack)

Returns a new NkBakedFont instance allocated on the specified MemoryStack.

Parameters
stack:MemoryStack

the stack from which to allocate

mallocback to summary
public static NkBakedFont.Buffer malloc(int capacity, MemoryStack stack)

Returns a new NkBakedFont.Buffer instance allocated on the specified MemoryStack.

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

nascentback to summary
public static float nascent(long struct)

Unsafe version of ascent.

nascentback to summary
public static void nascent(long struct, float value)

Unsafe version of ascent.

ndescentback to summary
public static float ndescent(long struct)

Unsafe version of descent.

ndescentback to summary
public static void ndescent(long struct, float value)

Unsafe version of descent.

nglyph_countback to summary
public static int nglyph_count(long struct)

Unsafe version of glyph_count.

nglyph_countback to summary
public static void nglyph_count(long struct, int value)

Unsafe version of glyph_count.

nglyph_offsetback to summary
public static int nglyph_offset(long struct)

Unsafe version of glyph_offset.

nglyph_offsetback to summary
public static void nglyph_offset(long struct, int value)

Unsafe version of glyph_offset.

nheightback to summary
public static float nheight(long struct)

Unsafe version of height.

nheightback to summary
public static void nheight(long struct, float value)

Unsafe version of height.

nrangesback to summary
public static IntBuffer nranges(long struct, int capacity)

Unsafe version of ranges.

Annotations
@Nullable
nrangesback to summary
public static void nranges(long struct, IntBuffer value)

Unsafe version of ranges.

rangesback to summary
public IntBuffer ranges(int capacity)
Parameters
capacity:int

the number of elements in the returned buffer

Returns:IntBuffer

font codepoint ranges as pairs of (from/to) and 0 as last element

Annotations
@Nullable
@NativeType:nk_rune const *
rangesback to summary
public NkBakedFont ranges(IntBuffer value)

Sets the address of the specified IntBuffer to the ranges field.

setback to summary
public NkBakedFont set(float height, float ascent, float descent, int glyph_offset, int glyph_count, IntBuffer ranges)

Initializes this struct with the specified values.

setback to summary
public NkBakedFont set(NkBakedFont src)

Copies the specified struct data to this struct.

Parameters
src:NkBakedFont

the source struct

Returns:NkBakedFont

this struct

sizeofback to summary
public int sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Doc from org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).

Annotations
@Override
org.lwjgl.nuklear back to summary

public Class NkBakedFont.Buffer

extends StructBuffer<NkBakedFont, NkBakedFont.Buffer>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable

An array of NkBakedFont structs.

Field Summary

Modifier and TypeField and Description
private static final NkBakedFont

Constructor Summary

AccessConstructor and Description
public
Buffer(ByteBuffer container)

Creates a new NkBakedFont.Buffer instance backed by the specified container.

public
Buffer(long address, int cap)

pack-priv
Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Summary

Modifier and TypeMethod and Description
public float

Returns:

the value of the NkBakedFont#ascent field.
ascent
()

public NkBakedFont.Buffer
ascent(float value)

Sets the specified value to the NkBakedFont#ascent field.

public float

Returns:

the value of the NkBakedFont#descent field.
descent
()

public NkBakedFont.Buffer
descent(float value)

Sets the specified value to the NkBakedFont#descent field.

protected NkBakedFont
public int

Returns:

the value of the NkBakedFont#glyph_count field.
glyph_count
()

public NkBakedFont.Buffer
glyph_count(int value)

Sets the specified value to the NkBakedFont#glyph_count field.

public int

Returns:

the value of the NkBakedFont#glyph_offset field.
glyph_offset
()

public NkBakedFont.Buffer
glyph_offset(int value)

Sets the specified value to the NkBakedFont#glyph_offset field.

public float

Returns:

the value of the NkBakedFont#height field.
height
()

public NkBakedFont.Buffer
height(float value)

Sets the specified value to the NkBakedFont#height field.

public IntBuffer

Returns:

a IntBuffer view of the data pointed to by the NkBakedFont#ranges field.
ranges
(int
the number of elements in the returned buffer
capacity
)

public NkBakedFont.Buffer
ranges(IntBuffer value)

Sets the address of the specified IntBuffer to the NkBakedFont#ranges field.

protected NkBakedFont.Buffer
Inherited from org.lwjgl.system.StructBuffer:
applyapplyforEachgetgetgetgetiteratorparallelStreamputputsizeofspliteratorstream

Field Detail

ELEMENT_FACTORYback to summary
private static final NkBakedFont ELEMENT_FACTORY

Constructor Detail

Bufferback to summary
public Buffer(ByteBuffer container)

Creates a new NkBakedFont.Buffer instance backed by the specified container.

Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided by NkBakedFont#SIZEOF, and its mark will be undefined.

The created buffer instance holds a strong reference to the container object.

Bufferback to summary
public Buffer(long address, int cap)
Bufferback to summary
pack-priv Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Detail

ascentback to summary
public float ascent()
Returns:float

the value of the NkBakedFont#ascent field.

ascentback to summary
public NkBakedFont.Buffer ascent(float value)

Sets the specified value to the NkBakedFont#ascent field.

descentback to summary
public float descent()
Returns:float

the value of the NkBakedFont#descent field.

descentback to summary
public NkBakedFont.Buffer descent(float value)

Sets the specified value to the NkBakedFont#descent field.

getElementFactoryback to summary
protected NkBakedFont getElementFactory()

Implements abstract org.lwjgl.system.StructBuffer.getElementFactory.

Annotations
@Override
glyph_countback to summary
public int glyph_count()
Returns:int

the value of the NkBakedFont#glyph_count field.

Annotations
@NativeType:nk_rune
glyph_countback to summary
public NkBakedFont.Buffer glyph_count(int value)

Sets the specified value to the NkBakedFont#glyph_count field.

glyph_offsetback to summary
public int glyph_offset()
Returns:int

the value of the NkBakedFont#glyph_offset field.

Annotations
@NativeType:nk_rune
glyph_offsetback to summary
public NkBakedFont.Buffer glyph_offset(int value)

Sets the specified value to the NkBakedFont#glyph_offset field.

heightback to summary
public float height()
Returns:float

the value of the NkBakedFont#height field.

heightback to summary
public NkBakedFont.Buffer height(float value)

Sets the specified value to the NkBakedFont#height field.

rangesback to summary
public IntBuffer ranges(int capacity)
Parameters
capacity:int

the number of elements in the returned buffer

Returns:IntBuffer

a IntBuffer view of the data pointed to by the NkBakedFont#ranges field.

Annotations
@Nullable
@NativeType:nk_rune const *
rangesback to summary
public NkBakedFont.Buffer ranges(IntBuffer value)

Sets the address of the specified IntBuffer to the NkBakedFont#ranges field.

selfback to summary
protected NkBakedFont.Buffer self()

Implements abstract org.lwjgl.system.CustomBuffer.self.

Annotations
@Override