public class NkUserFontGlyph
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
uv[2] – texture coordinatesoffset – offset between top left and glyphwidth – width of the glyphheight – height of the glyphxadvance – offset to the next glyph
struct nk_user_font_glyph {
struct nk_vec2 uv[2];
struct nk_vec2 offset;
float width;
float height;
float xadvance;
}| Modifier and Type | Class and Description |
|---|---|
static class |
NkUserFontGlyph.Buffer
An array of
NkUserFontGlyph structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
HEIGHT
The struct member offsets.
|
static int |
OFFSET
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
static int |
UV
The struct member offsets.
|
static int |
WIDTH
The struct member offsets.
|
static int |
XADVANCE
The struct member offsets.
|
| Constructor and Description |
|---|
NkUserFontGlyph(java.nio.ByteBuffer container)
Creates a
NkUserFontGlyph instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static NkUserFontGlyph |
calloc()
Returns a new
NkUserFontGlyph instance allocated with memCalloc. |
static NkUserFontGlyph.Buffer |
calloc(int capacity)
Returns a new
NkUserFontGlyph.Buffer instance allocated with memCalloc. |
static NkUserFontGlyph |
callocStack()
Returns a new
NkUserFontGlyph instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static NkUserFontGlyph.Buffer |
callocStack(int capacity)
Returns a new
NkUserFontGlyph.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static NkUserFontGlyph.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
NkUserFontGlyph.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static NkUserFontGlyph |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
NkUserFontGlyph instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static NkUserFontGlyph |
create()
Returns a new
NkUserFontGlyph instance allocated with BufferUtils. |
static NkUserFontGlyph.Buffer |
create(int capacity)
Returns a new
NkUserFontGlyph.Buffer instance allocated with BufferUtils. |
static NkUserFontGlyph |
create(long address)
Returns a new
NkUserFontGlyph instance for the specified memory address. |
static NkUserFontGlyph.Buffer |
create(long address,
int capacity)
Create a
NkUserFontGlyph.Buffer instance at the specified memory. |
static NkUserFontGlyph |
createSafe(long address)
|
static NkUserFontGlyph.Buffer |
createSafe(long address,
int capacity)
|
float |
height()
Returns the value of the
height field. |
NkUserFontGlyph |
height(float value)
Sets the specified value to the
height field. |
static NkUserFontGlyph |
malloc()
Returns a new
NkUserFontGlyph instance allocated with memAlloc. |
static NkUserFontGlyph.Buffer |
malloc(int capacity)
Returns a new
NkUserFontGlyph.Buffer instance allocated with memAlloc. |
static NkUserFontGlyph |
mallocStack()
Returns a new
NkUserFontGlyph instance allocated on the thread-local MemoryStack. |
static NkUserFontGlyph.Buffer |
mallocStack(int capacity)
Returns a new
NkUserFontGlyph.Buffer instance allocated on the thread-local MemoryStack. |
static NkUserFontGlyph.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
NkUserFontGlyph.Buffer instance allocated on the specified MemoryStack. |
static NkUserFontGlyph |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
NkUserFontGlyph instance allocated on the specified MemoryStack. |
static float |
nheight(long struct)
Unsafe version of
height(). |
static void |
nheight(long struct,
float value)
Unsafe version of
height. |
static NkVec2 |
noffset(long struct)
Unsafe version of
offset(). |
static void |
noffset(long struct,
NkVec2 value)
Unsafe version of
offset. |
static NkVec2.Buffer |
nuv(long struct)
Unsafe version of
uv(). |
static NkVec2 |
nuv(long struct,
int index)
Unsafe version of
uv. |
static void |
nuv(long struct,
int index,
NkVec2 value)
Unsafe version of
uv. |
static void |
nuv(long struct,
NkVec2.Buffer value)
Unsafe version of
uv. |
static float |
nwidth(long struct)
Unsafe version of
width(). |
static void |
nwidth(long struct,
float value)
Unsafe version of
width. |
static float |
nxadvance(long struct)
Unsafe version of
xadvance(). |
static void |
nxadvance(long struct,
float value)
Unsafe version of
xadvance. |
NkVec2 |
offset()
Returns a
NkVec2 view of the offset field. |
NkUserFontGlyph |
offset(java.util.function.Consumer<NkVec2> consumer)
Passes the
offset field to the specified Consumer. |
NkUserFontGlyph |
offset(NkVec2 value)
Copies the specified
NkVec2 to the offset field. |
NkUserFontGlyph |
set(NkUserFontGlyph src)
Copies the specified struct data to this struct.
|
NkUserFontGlyph |
set(NkVec2.Buffer uv,
NkVec2 offset,
float width,
float height,
float xadvance)
Initializes this struct with the specified values.
|
int |
sizeof() |
NkVec2.Buffer |
uv()
Returns a
NkVec2.Buffer view of the uv field. |
NkUserFontGlyph |
uv(java.util.function.Consumer<NkVec2.Buffer> consumer)
Passes the
uv field to the specified Consumer. |
NkVec2 |
uv(int index)
Returns a
NkVec2 view of the struct at the specified index of the uv field. |
NkUserFontGlyph |
uv(int index,
java.util.function.Consumer<NkVec2> consumer)
Passes the element at
index of the uv field to the specified Consumer. |
NkUserFontGlyph |
uv(int index,
NkVec2 value)
Copies the specified
NkVec2 at the specified index of the uv field. |
NkUserFontGlyph |
uv(NkVec2.Buffer value)
Copies the specified
NkVec2.Buffer to the uv field. |
float |
width()
Returns the value of the
width field. |
NkUserFontGlyph |
width(float value)
Sets the specified value to the
width field. |
float |
xadvance()
Returns the value of the
xadvance field. |
NkUserFontGlyph |
xadvance(float value)
Sets the specified value to the
xadvance field. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int UV
public static final int OFFSET
public static final int WIDTH
public static final int HEIGHT
public static final int XADVANCE
public NkUserFontGlyph(java.nio.ByteBuffer container)
NkUserFontGlyph 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.
public int sizeof()
sizeof in class org.lwjgl.system.Structpublic NkVec2.Buffer uv()
NkVec2.Buffer view of the uv field.public NkVec2 uv(int index)
NkVec2 view of the struct at the specified index of the uv field.public float width()
width field.public float height()
height field.public float xadvance()
xadvance field.public NkUserFontGlyph uv(NkVec2.Buffer value)
NkVec2.Buffer to the uv field.public NkUserFontGlyph uv(int index, NkVec2 value)
NkVec2 at the specified index of the uv field.public NkUserFontGlyph uv(java.util.function.Consumer<NkVec2.Buffer> consumer)
uv field to the specified Consumer.public NkUserFontGlyph uv(int index, java.util.function.Consumer<NkVec2> consumer)
index of the uv field to the specified Consumer.public NkUserFontGlyph offset(NkVec2 value)
NkVec2 to the offset field.public NkUserFontGlyph offset(java.util.function.Consumer<NkVec2> consumer)
offset field to the specified Consumer.public NkUserFontGlyph width(float value)
width field.public NkUserFontGlyph height(float value)
height field.public NkUserFontGlyph xadvance(float value)
xadvance field.public NkUserFontGlyph set(NkVec2.Buffer uv, NkVec2 offset, float width, float height, float xadvance)
public NkUserFontGlyph set(NkUserFontGlyph src)
src - the source structpublic static NkUserFontGlyph malloc()
NkUserFontGlyph instance allocated with memAlloc. The instance must be explicitly freed.public static NkUserFontGlyph calloc()
NkUserFontGlyph instance allocated with memCalloc. The instance must be explicitly freed.public static NkUserFontGlyph create()
NkUserFontGlyph instance allocated with BufferUtils.public static NkUserFontGlyph create(long address)
NkUserFontGlyph instance for the specified memory address.@Nullable public static NkUserFontGlyph createSafe(long address)
public static NkUserFontGlyph.Buffer malloc(int capacity)
NkUserFontGlyph.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static NkUserFontGlyph.Buffer calloc(int capacity)
NkUserFontGlyph.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static NkUserFontGlyph.Buffer create(int capacity)
NkUserFontGlyph.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static NkUserFontGlyph.Buffer create(long address, int capacity)
NkUserFontGlyph.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static NkUserFontGlyph.Buffer createSafe(long address, int capacity)
public static NkUserFontGlyph mallocStack()
NkUserFontGlyph instance allocated on the thread-local MemoryStack.public static NkUserFontGlyph callocStack()
NkUserFontGlyph instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static NkUserFontGlyph mallocStack(org.lwjgl.system.MemoryStack stack)
NkUserFontGlyph instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static NkUserFontGlyph callocStack(org.lwjgl.system.MemoryStack stack)
NkUserFontGlyph instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static NkUserFontGlyph.Buffer mallocStack(int capacity)
NkUserFontGlyph.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static NkUserFontGlyph.Buffer callocStack(int capacity)
NkUserFontGlyph.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static NkUserFontGlyph.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
NkUserFontGlyph.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static NkUserFontGlyph.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
NkUserFontGlyph.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatecapacity - the buffer capacitypublic static NkVec2.Buffer nuv(long struct)
uv().public static float nwidth(long struct)
width().public static float nheight(long struct)
height().public static float nxadvance(long struct)
xadvance().public static void nuv(long struct,
NkVec2.Buffer value)
uv.public static void nwidth(long struct,
float value)
width.public static void nheight(long struct,
float value)
height.public static void nxadvance(long struct,
float value)
xadvance.Copyright LWJGL. All Rights Reserved. License terms.