Package org.lwjgl.nanovg
Class NVGColor
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.nanovg.NVGColor
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class NVGColor extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNVGColor.BufferAn array ofNVGColorstructs.
-
Constructor Summary
Constructors Constructor Description NVGColor(java.nio.ByteBuffer container)Creates aNVGColorinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description floata()the color alpha componentNVGColora(float value)Sets the specified value to thea()field.floatb()the color blue componentNVGColorb(float value)Sets the specified value to theb()field.static NVGColorcalloc()Returns a newNVGColorinstance allocated withmemCalloc.static NVGColor.Buffercalloc(int capacity)Returns a newNVGColor.Bufferinstance allocated withmemCalloc.static NVGColor.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newNVGColor.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NVGColorcalloc(org.lwjgl.system.MemoryStack stack)Returns a newNVGColorinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NVGColorcallocStack()Deprecated.static NVGColor.BuffercallocStack(int capacity)Deprecated.static NVGColor.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static NVGColorcallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static NVGColorcreate()Returns a newNVGColorinstance allocated withBufferUtils.static NVGColor.Buffercreate(int capacity)Returns a newNVGColor.Bufferinstance allocated withBufferUtils.static NVGColorcreate(long address)Returns a newNVGColorinstance for the specified memory address.static NVGColor.Buffercreate(long address, int capacity)Create aNVGColor.Bufferinstance at the specified memory.static NVGColorcreateSafe(long address)static NVGColor.BuffercreateSafe(long address, int capacity)floatg()the color green componentNVGColorg(float value)Sets the specified value to theg()field.static NVGColormalloc()Returns a newNVGColorinstance allocated withmemAlloc.static NVGColor.Buffermalloc(int capacity)Returns a newNVGColor.Bufferinstance allocated withmemAlloc.static NVGColor.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newNVGColor.Bufferinstance allocated on the specifiedMemoryStack.static NVGColormalloc(org.lwjgl.system.MemoryStack stack)Returns a newNVGColorinstance allocated on the specifiedMemoryStack.static NVGColormallocStack()Deprecated.static NVGColor.BuffermallocStack(int capacity)Deprecated.static NVGColor.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static NVGColormallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static floatna(long struct)Unsafe version ofa().static voidna(long struct, float value)Unsafe version ofa.static floatnb(long struct)Unsafe version ofb().static voidnb(long struct, float value)Unsafe version ofb.static floatng(long struct)Unsafe version ofg().static voidng(long struct, float value)Unsafe version ofg.static floatnr(long struct)Unsafe version ofr().static voidnr(long struct, float value)Unsafe version ofr.static java.nio.FloatBuffernrgba(long struct)Unsafe version ofrgba().static floatnrgba(long struct, int index)Unsafe version ofrgba.static voidnrgba(long struct, int index, float value)Unsafe version ofrgba.static voidnrgba(long struct, java.nio.FloatBuffer value)Unsafe version ofrgba.floatr()the color red componentNVGColorr(float value)Sets the specified value to ther()field.java.nio.FloatBufferrgba()an array of 4 color componentsfloatrgba(int index)an array of 4 color componentsNVGColorrgba(int index, float value)Sets the specified value at the specified index of thergba()field.NVGColorrgba(java.nio.FloatBuffer value)Copies the specifiedFloatBufferto thergba()field.NVGColorset(NVGColor src)Copies the specified struct data to this struct.intsizeof()
-
-
-
Constructor Detail
-
NVGColor
public NVGColor(java.nio.ByteBuffer container)
Creates aNVGColorinstance at the current position of the specifiedByteBuffercontainer. 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
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
rgba
public java.nio.FloatBuffer rgba() public float rgba(int index)
an array of 4 color components
-
r
public float r()
the color red component
-
g
public float g()
the color green component
-
b
public float b()
the color blue component
-
a
public float a()
the color alpha component
-
rgba
public NVGColor rgba(java.nio.FloatBuffer value)
Copies the specifiedFloatBufferto thergba()field.
-
rgba
public NVGColor rgba(int index, float value)
Sets the specified value at the specified index of thergba()field.
-
set
public NVGColor set(NVGColor src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static NVGColor malloc()
Returns a newNVGColorinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static NVGColor calloc()
Returns a newNVGColorinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static NVGColor create()
Returns a newNVGColorinstance allocated withBufferUtils.
-
create
public static NVGColor create(long address)
Returns a newNVGColorinstance for the specified memory address.
-
createSafe
@Nullable public static NVGColor createSafe(long address)
-
malloc
public static NVGColor.Buffer malloc(int capacity)
Returns a newNVGColor.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static NVGColor.Buffer calloc(int capacity)
Returns a newNVGColor.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static NVGColor.Buffer create(int capacity)
Returns a newNVGColor.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static NVGColor.Buffer create(long address, int capacity)
Create aNVGColor.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static NVGColor.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static NVGColor mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static NVGColor callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static NVGColor mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static NVGColor callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static NVGColor.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static NVGColor.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static NVGColor.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static NVGColor.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static NVGColor malloc(org.lwjgl.system.MemoryStack stack)
Returns a newNVGColorinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static NVGColor calloc(org.lwjgl.system.MemoryStack stack)
Returns a newNVGColorinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static NVGColor.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNVGColor.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static NVGColor.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNVGColor.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nrgba
public static java.nio.FloatBuffer nrgba(long struct)
Unsafe version ofrgba().
-
nrgba
public static float nrgba(long struct, int index)Unsafe version ofrgba.
-
nr
public static float nr(long struct)
Unsafe version ofr().
-
ng
public static float ng(long struct)
Unsafe version ofg().
-
nb
public static float nb(long struct)
Unsafe version ofb().
-
na
public static float na(long struct)
Unsafe version ofa().
-
nrgba
public static void nrgba(long struct, java.nio.FloatBuffer value)Unsafe version ofrgba.
-
nrgba
public static void nrgba(long struct, int index, float value)Unsafe version ofrgba.
-
nr
public static void nr(long struct, float value)Unsafe version ofr.
-
ng
public static void ng(long struct, float value)Unsafe version ofg.
-
nb
public static void nb(long struct, float value)Unsafe version ofb.
-
na
public static void na(long struct, float value)Unsafe version ofa.
-
-