public class NVGColor
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
rgba[4] – an array of 4 color componentsr – the color red componentg – the color green componentb – the color blue componenta – the color alpha component
struct NVGcolor {
union {
float rgba[4];
struct {
float r;
float g;
float b;
float a;
};
};
}| Modifier and Type | Class and Description |
|---|---|
static class |
NVGColor.Buffer
An array of
NVGColor 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 |
RGBA
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
| Constructor and Description |
|---|
NVGColor(java.nio.ByteBuffer container)
Creates a
NVGColor instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
float |
a()
Returns the value of the
a field. |
NVGColor |
a(float value)
Sets the specified value to the
a field. |
float |
b()
Returns the value of the
b field. |
NVGColor |
b(float value)
Sets the specified value to the
b field. |
static NVGColor |
calloc()
Returns a new
NVGColor instance allocated with memCalloc. |
static NVGColor.Buffer |
calloc(int capacity)
Returns a new
NVGColor.Buffer instance allocated with memCalloc. |
static NVGColor |
callocStack()
Returns a new
NVGColor instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static NVGColor.Buffer |
callocStack(int capacity)
Returns a new
NVGColor.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static NVGColor.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
NVGColor.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static NVGColor |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
NVGColor instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static NVGColor |
create()
Returns a new
NVGColor instance allocated with BufferUtils. |
static NVGColor.Buffer |
create(int capacity)
Returns a new
NVGColor.Buffer instance allocated with BufferUtils. |
static NVGColor |
create(long address)
Returns a new
NVGColor instance for the specified memory address. |
static NVGColor.Buffer |
create(long address,
int capacity)
Create a
NVGColor.Buffer instance at the specified memory. |
static NVGColor |
createSafe(long address)
|
static NVGColor.Buffer |
createSafe(long address,
int capacity)
|
float |
g()
Returns the value of the
g field. |
NVGColor |
g(float value)
Sets the specified value to the
g field. |
static NVGColor |
malloc()
Returns a new
NVGColor instance allocated with memAlloc. |
static NVGColor.Buffer |
malloc(int capacity)
Returns a new
NVGColor.Buffer instance allocated with memAlloc. |
static NVGColor |
mallocStack()
Returns a new
NVGColor instance allocated on the thread-local MemoryStack. |
static NVGColor.Buffer |
mallocStack(int capacity)
Returns a new
NVGColor.Buffer instance allocated on the thread-local MemoryStack. |
static NVGColor.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
NVGColor.Buffer instance allocated on the specified MemoryStack. |
static NVGColor |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
NVGColor instance allocated on the specified MemoryStack. |
static float |
na(long struct)
Unsafe version of
a(). |
static void |
na(long struct,
float value)
Unsafe version of
a. |
static float |
nb(long struct)
Unsafe version of
b(). |
static void |
nb(long struct,
float value)
Unsafe version of
b. |
static float |
ng(long struct)
Unsafe version of
g(). |
static void |
ng(long struct,
float value)
Unsafe version of
g. |
static float |
nr(long struct)
Unsafe version of
r(). |
static void |
nr(long struct,
float value)
Unsafe version of
r. |
static java.nio.FloatBuffer |
nrgba(long struct)
Unsafe version of
rgba(). |
static void |
nrgba(long struct,
java.nio.FloatBuffer value)
Unsafe version of
rgba. |
static float |
nrgba(long struct,
int index)
Unsafe version of
rgba. |
static void |
nrgba(long struct,
int index,
float value)
Unsafe version of
rgba. |
float |
r()
Returns the value of the
r field. |
NVGColor |
r(float value)
Sets the specified value to the
r field. |
java.nio.FloatBuffer |
rgba()
Returns a
FloatBuffer view of the rgba field. |
NVGColor |
rgba(java.nio.FloatBuffer value)
Copies the specified
FloatBuffer to the rgba field. |
float |
rgba(int index)
Returns the value at the specified index of the
rgba field. |
NVGColor |
rgba(int index,
float value)
Sets the specified value at the specified index of the
rgba field. |
NVGColor |
set(NVGColor 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 RGBA
public static final int R
public static final int G
public static final int B
public static final int A
public NVGColor(java.nio.ByteBuffer container)
NVGColor 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 java.nio.FloatBuffer rgba()
FloatBuffer view of the rgba field.public float rgba(int index)
rgba field.public float r()
r field.public float g()
g field.public float b()
b field.public float a()
a field.public NVGColor rgba(java.nio.FloatBuffer value)
FloatBuffer to the rgba field.public NVGColor rgba(int index, float value)
rgba field.public NVGColor r(float value)
r field.public NVGColor g(float value)
g field.public NVGColor b(float value)
b field.public NVGColor a(float value)
a field.public NVGColor set(NVGColor src)
src - the source structpublic static NVGColor malloc()
NVGColor instance allocated with memAlloc. The instance must be explicitly freed.public static NVGColor calloc()
NVGColor instance allocated with memCalloc. The instance must be explicitly freed.public static NVGColor create()
NVGColor instance allocated with BufferUtils.public static NVGColor create(long address)
NVGColor instance for the specified memory address.@Nullable public static NVGColor createSafe(long address)
public static NVGColor.Buffer malloc(int capacity)
NVGColor.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static NVGColor.Buffer calloc(int capacity)
NVGColor.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static NVGColor.Buffer create(int capacity)
NVGColor.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static NVGColor.Buffer create(long address, int capacity)
NVGColor.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static NVGColor.Buffer createSafe(long address, int capacity)
public static NVGColor mallocStack()
NVGColor instance allocated on the thread-local MemoryStack.public static NVGColor callocStack()
NVGColor instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static NVGColor mallocStack(org.lwjgl.system.MemoryStack stack)
NVGColor instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static NVGColor callocStack(org.lwjgl.system.MemoryStack stack)
NVGColor instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static NVGColor.Buffer mallocStack(int capacity)
NVGColor.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static NVGColor.Buffer callocStack(int capacity)
NVGColor.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static NVGColor.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
NVGColor.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static NVGColor.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
NVGColor.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 java.nio.FloatBuffer nrgba(long struct)
rgba().public static float nrgba(long struct,
int index)
rgba.public static float nr(long struct)
r().public static float ng(long struct)
g().public static float nb(long struct)
b().public static float na(long struct)
a().public static void nrgba(long struct,
java.nio.FloatBuffer value)
rgba.public static void nrgba(long struct,
int index,
float value)
rgba.public static void nr(long struct,
float value)
r.public static void ng(long struct,
float value)
g.public static void nb(long struct,
float value)
b.public static void na(long struct,
float value)
a.Copyright LWJGL. All Rights Reserved. License terms.