Top Description Inners Fields Constructors Methods
org.lwjgl.nuklear

public Class NkFontGlyph

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

Layout


struct nk_font_glyph {
    nk_rune codepoint;
    float xadvance;
    float x0;
    float y0;
    float x1;
    float y1;
    float w;
    float h;
    float u0;
    float v0;
    float u1;
    float v1;
}

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
NkFontGlyph.Buffer

An array of NkFontGlyph structs.

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
CODEPOINT

The struct member offsets.

public static final int
H

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

public static final int
U0

The struct member offsets.

public static final int
U1

The struct member offsets.

public static final int
V0

The struct member offsets.

public static final int
V1

The struct member offsets.

public static final int
W

The struct member offsets.

public static final int
X0

The struct member offsets.

public static final int
X1

The struct member offsets.

public static final int
XADVANCE

The struct member offsets.

public static final int
Y0

The struct member offsets.

public static final int
Y1

The struct member offsets.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

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

public
NkFontGlyph(ByteBuffer container)

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

Method Summary

Modifier and TypeMethod and Description
public static NkFontGlyph
calloc()

Returns a new NkFontGlyph instance allocated with memCalloc.

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

Returns a new NkFontGlyph.Buffer instance allocated with memCalloc.

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

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

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

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

public int

Returns:

the value of the codepoint field.
codepoint
()

public NkFontGlyph
codepoint(int value)

Sets the specified value to the codepoint field.

protected NkFontGlyph
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 NkFontGlyph
create()

Returns a new NkFontGlyph instance allocated with BufferUtils.

public static NkFontGlyph
create(long address)

Returns a new NkFontGlyph instance for the specified memory address.

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

Returns a new NkFontGlyph.Buffer instance allocated with BufferUtils.

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

Create a NkFontGlyph.Buffer instance at the specified memory.

public static NkFontGlyph
createSafe(long address)

Like create, but returns null if address is NULL.

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

Like create, but returns null if address is NULL.

public float

Returns:

the value of the h field.
h
()

public NkFontGlyph
h(float value)

Sets the specified value to the h field.

public static NkFontGlyph
malloc()

Returns a new NkFontGlyph instance allocated with memAlloc.

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

Returns a new NkFontGlyph.Buffer instance allocated with memAlloc.

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

Returns a new NkFontGlyph instance allocated on the specified MemoryStack.

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

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

public static int
ncodepoint(long struct)

Unsafe version of codepoint.

public static void
ncodepoint(long struct, int value)

Unsafe version of codepoint.

public static float
nh(long struct)

Unsafe version of h.

public static void
nh(long struct, float value)

Unsafe version of h.

public static float
nu0(long struct)

Unsafe version of u0.

public static void
nu0(long struct, float value)

Unsafe version of u0.

public static float
nu1(long struct)

Unsafe version of u1.

public static void
nu1(long struct, float value)

Unsafe version of u1.

public static float
nv0(long struct)

Unsafe version of v0.

public static void
nv0(long struct, float value)

Unsafe version of v0.

public static float
nv1(long struct)

Unsafe version of v1.

public static void
nv1(long struct, float value)

Unsafe version of v1.

public static float
nw(long struct)

Unsafe version of w.

public static void
nw(long struct, float value)

Unsafe version of w.

public static float
nx0(long struct)

Unsafe version of x0.

public static void
nx0(long struct, float value)

Unsafe version of x0.

public static float
nx1(long struct)

Unsafe version of x1.

public static void
nx1(long struct, float value)

Unsafe version of x1.

public static float
nxadvance(long struct)

Unsafe version of xadvance.

public static void
nxadvance(long struct, float value)

Unsafe version of xadvance.

public static float
ny0(long struct)

Unsafe version of y0.

public static void
ny0(long struct, float value)

Unsafe version of y0.

public static float
ny1(long struct)

Unsafe version of y1.

public static void
ny1(long struct, float value)

Unsafe version of y1.

public NkFontGlyph
set(int codepoint, float xadvance, float x0, float y0, float x1, float y1, float w, float h, float u0, float v0, float u1, float v1)

Initializes this struct with the specified values.

public NkFontGlyph

Returns:

this struct
set
(NkFontGlyph
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).
public float

Returns:

the value of the u0 field.
u0
()

public NkFontGlyph
u0(float value)

Sets the specified value to the u0 field.

public float

Returns:

the value of the u1 field.
u1
()

public NkFontGlyph
u1(float value)

Sets the specified value to the u1 field.

public float

Returns:

the value of the v0 field.
v0
()

public NkFontGlyph
v0(float value)

Sets the specified value to the v0 field.

public float

Returns:

the value of the v1 field.
v1
()

public NkFontGlyph
v1(float value)

Sets the specified value to the v1 field.

public float

Returns:

the value of the w field.
w
()

public NkFontGlyph
w(float value)

Sets the specified value to the w field.

public float

Returns:

the value of the x0 field.
x0
()

public NkFontGlyph
x0(float value)

Sets the specified value to the x0 field.

public float

Returns:

the value of the x1 field.
x1
()

public NkFontGlyph
x1(float value)

Sets the specified value to the x1 field.

public float

Returns:

the value of the xadvance field.
xadvance
()

public NkFontGlyph
xadvance(float value)

Sets the specified value to the xadvance field.

public float

Returns:

the value of the y0 field.
y0
()

public NkFontGlyph
y0(float value)

Sets the specified value to the y0 field.

public float

Returns:

the value of the y1 field.
y1
()

public NkFontGlyph
y1(float value)

Sets the specified value to the y1 field.

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.

CODEPOINTback to summary
public static final int CODEPOINT

The struct member offsets.

Hback to summary
public static final int H

The struct member offsets.

SIZEOFback to summary
public static final int SIZEOF

The struct size in bytes.

U0back to summary
public static final int U0

The struct member offsets.

U1back to summary
public static final int U1

The struct member offsets.

V0back to summary
public static final int V0

The struct member offsets.

V1back to summary
public static final int V1

The struct member offsets.

Wback to summary
public static final int W

The struct member offsets.

X0back to summary
public static final int X0

The struct member offsets.

X1back to summary
public static final int X1

The struct member offsets.

XADVANCEback to summary
public static final int XADVANCE

The struct member offsets.

Y0back to summary
public static final int Y0

The struct member offsets.

Y1back to summary
public static final int Y1

The struct member offsets.

Constructor Detail

NkFontGlyphback to summary
protected NkFontGlyph(long address, ByteBuffer container)
NkFontGlyphback to summary
public NkFontGlyph(ByteBuffer container)

Creates a NkFontGlyph 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

callocback to summary
public static NkFontGlyph calloc()

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

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

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

Parameters
capacity:int

the buffer capacity

callocback to summary
public static NkFontGlyph calloc(MemoryStack stack)

Returns a new NkFontGlyph 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 NkFontGlyph.Buffer calloc(int capacity, MemoryStack stack)

Returns a new NkFontGlyph.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

codepointback to summary
public int codepoint()
Returns:int

the value of the codepoint field.

Annotations
@NativeType:nk_rune
codepointback to summary
public NkFontGlyph codepoint(int value)

Sets the specified value to the codepoint field.

createback to summary
protected NkFontGlyph 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 NkFontGlyph create()

Returns a new NkFontGlyph instance allocated with BufferUtils.

createback to summary
public static NkFontGlyph create(long address)

Returns a new NkFontGlyph instance for the specified memory address.

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

Returns a new NkFontGlyph.Buffer instance allocated with BufferUtils.

Parameters
capacity:int

the buffer capacity

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

Create a NkFontGlyph.Buffer instance at the specified memory.

Parameters
address:long

the memory address

capacity:int

the buffer capacity

createSafeback to summary
public static NkFontGlyph createSafe(long address)

Like create, but returns null if address is NULL.

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

Like create, but returns null if address is NULL.

Annotations
@Nullable
hback to summary
public float h()
Returns:float

the value of the h field.

hback to summary
public NkFontGlyph h(float value)

Sets the specified value to the h field.

mallocback to summary
public static NkFontGlyph malloc()

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

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

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

Parameters
capacity:int

the buffer capacity

mallocback to summary
public static NkFontGlyph malloc(MemoryStack stack)

Returns a new NkFontGlyph instance allocated on the specified MemoryStack.

Parameters
stack:MemoryStack

the stack from which to allocate

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

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

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

ncodepointback to summary
public static int ncodepoint(long struct)

Unsafe version of codepoint.

ncodepointback to summary
public static void ncodepoint(long struct, int value)

Unsafe version of codepoint.

nhback to summary
public static float nh(long struct)

Unsafe version of h.

nhback to summary
public static void nh(long struct, float value)

Unsafe version of h.

nu0back to summary
public static float nu0(long struct)

Unsafe version of u0.

nu0back to summary
public static void nu0(long struct, float value)

Unsafe version of u0.

nu1back to summary
public static float nu1(long struct)

Unsafe version of u1.

nu1back to summary
public static void nu1(long struct, float value)

Unsafe version of u1.

nv0back to summary
public static float nv0(long struct)

Unsafe version of v0.

nv0back to summary
public static void nv0(long struct, float value)

Unsafe version of v0.

nv1back to summary
public static float nv1(long struct)

Unsafe version of v1.

nv1back to summary
public static void nv1(long struct, float value)

Unsafe version of v1.

nwback to summary
public static float nw(long struct)

Unsafe version of w.

nwback to summary
public static void nw(long struct, float value)

Unsafe version of w.

nx0back to summary
public static float nx0(long struct)

Unsafe version of x0.

nx0back to summary
public static void nx0(long struct, float value)

Unsafe version of x0.

nx1back to summary
public static float nx1(long struct)

Unsafe version of x1.

nx1back to summary
public static void nx1(long struct, float value)

Unsafe version of x1.

nxadvanceback to summary
public static float nxadvance(long struct)

Unsafe version of xadvance.

nxadvanceback to summary
public static void nxadvance(long struct, float value)

Unsafe version of xadvance.

ny0back to summary
public static float ny0(long struct)

Unsafe version of y0.

ny0back to summary
public static void ny0(long struct, float value)

Unsafe version of y0.

ny1back to summary
public static float ny1(long struct)

Unsafe version of y1.

ny1back to summary
public static void ny1(long struct, float value)

Unsafe version of y1.

setback to summary
public NkFontGlyph set(int codepoint, float xadvance, float x0, float y0, float x1, float y1, float w, float h, float u0, float v0, float u1, float v1)

Initializes this struct with the specified values.

setback to summary
public NkFontGlyph set(NkFontGlyph src)

Copies the specified struct data to this struct.

Parameters
src:NkFontGlyph

the source struct

Returns:NkFontGlyph

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
u0back to summary
public float u0()
Returns:float

the value of the u0 field.

u0back to summary
public NkFontGlyph u0(float value)

Sets the specified value to the u0 field.

u1back to summary
public float u1()
Returns:float

the value of the u1 field.

u1back to summary
public NkFontGlyph u1(float value)

Sets the specified value to the u1 field.

v0back to summary
public float v0()
Returns:float

the value of the v0 field.

v0back to summary
public NkFontGlyph v0(float value)

Sets the specified value to the v0 field.

v1back to summary
public float v1()
Returns:float

the value of the v1 field.

v1back to summary
public NkFontGlyph v1(float value)

Sets the specified value to the v1 field.

wback to summary
public float w()
Returns:float

the value of the w field.

wback to summary
public NkFontGlyph w(float value)

Sets the specified value to the w field.

x0back to summary
public float x0()
Returns:float

the value of the x0 field.

x0back to summary
public NkFontGlyph x0(float value)

Sets the specified value to the x0 field.

x1back to summary
public float x1()
Returns:float

the value of the x1 field.

x1back to summary
public NkFontGlyph x1(float value)

Sets the specified value to the x1 field.

xadvanceback to summary
public float xadvance()
Returns:float

the value of the xadvance field.

xadvanceback to summary
public NkFontGlyph xadvance(float value)

Sets the specified value to the xadvance field.

y0back to summary
public float y0()
Returns:float

the value of the y0 field.

y0back to summary
public NkFontGlyph y0(float value)

Sets the specified value to the y0 field.

y1back to summary
public float y1()
Returns:float

the value of the y1 field.

y1back to summary
public NkFontGlyph y1(float value)

Sets the specified value to the y1 field.

org.lwjgl.nuklear back to summary

public Class NkFontGlyph.Buffer

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

An array of NkFontGlyph structs.

Field Summary

Modifier and TypeField and Description
private static final NkFontGlyph

Constructor Summary

AccessConstructor and Description
public
Buffer(ByteBuffer container)

Creates a new NkFontGlyph.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 int

Returns:

the value of the codepoint field.
codepoint
()

public NkFontGlyph.Buffer
codepoint(int value)

Sets the specified value to the codepoint field.

protected NkFontGlyph
public float

Returns:

the value of the h field.
h
()

public NkFontGlyph.Buffer
h(float value)

Sets the specified value to the h field.

protected NkFontGlyph.Buffer
public float

Returns:

the value of the u0 field.
u0
()

public NkFontGlyph.Buffer
u0(float value)

Sets the specified value to the u0 field.

public float

Returns:

the value of the u1 field.
u1
()

public NkFontGlyph.Buffer
u1(float value)

Sets the specified value to the u1 field.

public float

Returns:

the value of the v0 field.
v0
()

public NkFontGlyph.Buffer
v0(float value)

Sets the specified value to the v0 field.

public float

Returns:

the value of the v1 field.
v1
()

public NkFontGlyph.Buffer
v1(float value)

Sets the specified value to the v1 field.

public float

Returns:

the value of the w field.
w
()

public NkFontGlyph.Buffer
w(float value)

Sets the specified value to the w field.

public float

Returns:

the value of the x0 field.
x0
()

public NkFontGlyph.Buffer
x0(float value)

Sets the specified value to the x0 field.

public float

Returns:

the value of the x1 field.
x1
()

public NkFontGlyph.Buffer
x1(float value)

Sets the specified value to the x1 field.

public float

Returns:

the value of the xadvance field.
xadvance
()

public NkFontGlyph.Buffer
xadvance(float value)

Sets the specified value to the xadvance field.

public float

Returns:

the value of the y0 field.
y0
()

public NkFontGlyph.Buffer
y0(float value)

Sets the specified value to the y0 field.

public float

Returns:

the value of the y1 field.
y1
()

public NkFontGlyph.Buffer
y1(float value)

Sets the specified value to the y1 field.

Inherited from org.lwjgl.system.StructBuffer:
applyapplyforEachgetgetgetgetiteratorparallelStreamputputsizeofspliteratorstream

Field Detail

ELEMENT_FACTORYback to summary
private static final NkFontGlyph ELEMENT_FACTORY

Constructor Detail

Bufferback to summary
public Buffer(ByteBuffer container)

Creates a new NkFontGlyph.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 NkFontGlyph#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

codepointback to summary
public int codepoint()
Returns:int

the value of the codepoint field.

Annotations
@NativeType:nk_rune
codepointback to summary
public NkFontGlyph.Buffer codepoint(int value)

Sets the specified value to the codepoint field.

getElementFactoryback to summary
protected NkFontGlyph getElementFactory()

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

Annotations
@Override
hback to summary
public float h()
Returns:float

the value of the h field.

hback to summary
public NkFontGlyph.Buffer h(float value)

Sets the specified value to the h field.

selfback to summary
protected NkFontGlyph.Buffer self()

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

Annotations
@Override
u0back to summary
public float u0()
Returns:float

the value of the u0 field.

u0back to summary
public NkFontGlyph.Buffer u0(float value)

Sets the specified value to the u0 field.

u1back to summary
public float u1()
Returns:float

the value of the u1 field.

u1back to summary
public NkFontGlyph.Buffer u1(float value)

Sets the specified value to the u1 field.

v0back to summary
public float v0()
Returns:float

the value of the v0 field.

v0back to summary
public NkFontGlyph.Buffer v0(float value)

Sets the specified value to the v0 field.

v1back to summary
public float v1()
Returns:float

the value of the v1 field.

v1back to summary
public NkFontGlyph.Buffer v1(float value)

Sets the specified value to the v1 field.

wback to summary
public float w()
Returns:float

the value of the w field.

wback to summary
public NkFontGlyph.Buffer w(float value)

Sets the specified value to the w field.

x0back to summary
public float x0()
Returns:float

the value of the x0 field.

x0back to summary
public NkFontGlyph.Buffer x0(float value)

Sets the specified value to the x0 field.

x1back to summary
public float x1()
Returns:float

the value of the x1 field.

x1back to summary
public NkFontGlyph.Buffer x1(float value)

Sets the specified value to the x1 field.

xadvanceback to summary
public float xadvance()
Returns:float

the value of the xadvance field.

xadvanceback to summary
public NkFontGlyph.Buffer xadvance(float value)

Sets the specified value to the xadvance field.

y0back to summary
public float y0()
Returns:float

the value of the y0 field.

y0back to summary
public NkFontGlyph.Buffer y0(float value)

Sets the specified value to the y0 field.

y1back to summary
public float y1()
Returns:float

the value of the y1 field.

y1back to summary
public NkFontGlyph.Buffer y1(float value)

Sets the specified value to the y1 field.