public class NkColor
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
struct nk_color {
nk_byte r;
nk_byte g;
nk_byte b;
nk_byte a;
}| Modifier and Type | Class and Description |
|---|---|
static class |
NkColor.Buffer
An array of
NkColor structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
A
The struct member offsets.
|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
B
The struct member offsets.
|
static int |
G
The struct member offsets.
|
static int |
R
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
| Constructor and Description |
|---|
NkColor(java.nio.ByteBuffer container)
Creates a
NkColor instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
byte |
a()
Returns the value of the
a field. |
NkColor |
a(byte value)
Sets the specified value to the
a field. |
byte |
b()
Returns the value of the
b field. |
NkColor |
b(byte value)
Sets the specified value to the
b field. |
static NkColor |
calloc()
Returns a new
NkColor instance allocated with memCalloc. |
static NkColor.Buffer |
calloc(int capacity)
Returns a new
NkColor.Buffer instance allocated with memCalloc. |
static NkColor |
callocStack()
Returns a new
NkColor instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static NkColor.Buffer |
callocStack(int capacity)
Returns a new
NkColor.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static NkColor.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
NkColor.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static NkColor |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
NkColor instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static NkColor |
create()
Returns a new
NkColor instance allocated with BufferUtils. |
static NkColor.Buffer |
create(int capacity)
Returns a new
NkColor.Buffer instance allocated with BufferUtils. |
static NkColor |
create(long address)
Returns a new
NkColor instance for the specified memory address. |
static NkColor.Buffer |
create(long address,
int capacity)
Create a
NkColor.Buffer instance at the specified memory. |
static NkColor |
createSafe(long address)
|
static NkColor.Buffer |
createSafe(long address,
int capacity)
|
byte |
g()
Returns the value of the
g field. |
NkColor |
g(byte value)
Sets the specified value to the
g field. |
static NkColor |
malloc()
Returns a new
NkColor instance allocated with memAlloc. |
static NkColor.Buffer |
malloc(int capacity)
Returns a new
NkColor.Buffer instance allocated with memAlloc. |
static NkColor |
mallocStack()
Returns a new
NkColor instance allocated on the thread-local MemoryStack. |
static NkColor.Buffer |
mallocStack(int capacity)
Returns a new
NkColor.Buffer instance allocated on the thread-local MemoryStack. |
static NkColor.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
NkColor.Buffer instance allocated on the specified MemoryStack. |
static NkColor |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
NkColor instance allocated on the specified MemoryStack. |
static byte |
na(long struct)
Unsafe version of
a(). |
static void |
na(long struct,
byte value)
Unsafe version of
a. |
static byte |
nb(long struct)
Unsafe version of
b(). |
static void |
nb(long struct,
byte value)
Unsafe version of
b. |
static byte |
ng(long struct)
Unsafe version of
g(). |
static void |
ng(long struct,
byte value)
Unsafe version of
g. |
static byte |
nr(long struct)
Unsafe version of
r(). |
static void |
nr(long struct,
byte value)
Unsafe version of
r. |
byte |
r()
Returns the value of the
r field. |
NkColor |
r(byte value)
Sets the specified value to the
r field. |
NkColor |
set(byte r,
byte g,
byte b,
byte a)
Initializes this struct with the specified values.
|
NkColor |
set(NkColor src)
Copies the specified struct data to this struct.
|
int |
sizeof() |
public static final int SIZEOF
public static final int ALIGNOF
public static final int R
public static final int G
public static final int B
public static final int A
public NkColor(java.nio.ByteBuffer container)
NkColor 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 byte r()
r field.public byte g()
g field.public byte b()
b field.public byte a()
a field.public NkColor r(byte value)
r field.public NkColor g(byte value)
g field.public NkColor b(byte value)
b field.public NkColor a(byte value)
a field.public NkColor set(byte r, byte g, byte b, byte a)
public NkColor set(NkColor src)
src - the source structpublic static NkColor malloc()
NkColor instance allocated with memAlloc. The instance must be explicitly freed.public static NkColor calloc()
NkColor instance allocated with memCalloc. The instance must be explicitly freed.public static NkColor create()
NkColor instance allocated with BufferUtils.public static NkColor create(long address)
NkColor instance for the specified memory address.@Nullable public static NkColor createSafe(long address)
public static NkColor.Buffer malloc(int capacity)
NkColor.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static NkColor.Buffer calloc(int capacity)
NkColor.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static NkColor.Buffer create(int capacity)
NkColor.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static NkColor.Buffer create(long address, int capacity)
NkColor.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static NkColor.Buffer createSafe(long address, int capacity)
public static NkColor mallocStack()
NkColor instance allocated on the thread-local MemoryStack.public static NkColor callocStack()
NkColor instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static NkColor mallocStack(org.lwjgl.system.MemoryStack stack)
NkColor instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static NkColor callocStack(org.lwjgl.system.MemoryStack stack)
NkColor instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static NkColor.Buffer mallocStack(int capacity)
NkColor.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static NkColor.Buffer callocStack(int capacity)
NkColor.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static NkColor.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
NkColor.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static NkColor.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
NkColor.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 byte nr(long struct)
r().public static byte ng(long struct)
g().public static byte nb(long struct)
b().public static byte na(long struct)
a().public static void nr(long struct,
byte value)
r.public static void ng(long struct,
byte value)
g.public static void nb(long struct,
byte value)
b.public static void na(long struct,
byte value)
a.Copyright LWJGL. All Rights Reserved. License terms.