public class NVGPaint
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
xform[6] – the transformation matrixextent[2] – the extentradius – the radiusfeather – the feather amountinnerColor – the inner colorouterColor – the outer colorimage – the image handle
struct NVGpaint {
float xform[6];
float extent[2];
float radius;
float feather;
NVGcolor innerColor;
NVGcolor outerColor;
int image;
}| Modifier and Type | Class and Description |
|---|---|
static class |
NVGPaint.Buffer
An array of
NVGPaint structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
EXTENT
The struct member offsets.
|
static int |
FEATHER
The struct member offsets.
|
static int |
IMAGE
The struct member offsets.
|
static int |
INNERCOLOR
The struct member offsets.
|
static int |
OUTERCOLOR
The struct member offsets.
|
static int |
RADIUS
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
static int |
XFORM
The struct member offsets.
|
| Constructor and Description |
|---|
NVGPaint(java.nio.ByteBuffer container)
Creates a
NVGPaint instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static NVGPaint |
calloc()
Returns a new
NVGPaint instance allocated with memCalloc. |
static NVGPaint.Buffer |
calloc(int capacity)
Returns a new
NVGPaint.Buffer instance allocated with memCalloc. |
static NVGPaint |
callocStack()
Returns a new
NVGPaint instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static NVGPaint.Buffer |
callocStack(int capacity)
Returns a new
NVGPaint.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static NVGPaint.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
NVGPaint.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static NVGPaint |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
NVGPaint instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static NVGPaint |
create()
Returns a new
NVGPaint instance allocated with BufferUtils. |
static NVGPaint.Buffer |
create(int capacity)
Returns a new
NVGPaint.Buffer instance allocated with BufferUtils. |
static NVGPaint |
create(long address)
Returns a new
NVGPaint instance for the specified memory address. |
static NVGPaint.Buffer |
create(long address,
int capacity)
Create a
NVGPaint.Buffer instance at the specified memory. |
static NVGPaint |
createSafe(long address)
|
static NVGPaint.Buffer |
createSafe(long address,
int capacity)
|
java.nio.FloatBuffer |
extent()
Returns a
FloatBuffer view of the extent field. |
NVGPaint |
extent(java.nio.FloatBuffer value)
Copies the specified
FloatBuffer to the extent field. |
float |
extent(int index)
Returns the value at the specified index of the
extent field. |
NVGPaint |
extent(int index,
float value)
Sets the specified value at the specified index of the
extent field. |
float |
feather()
Returns the value of the
feather field. |
NVGPaint |
feather(float value)
Sets the specified value to the
feather field. |
int |
image()
Returns the value of the
image field. |
NVGPaint |
image(int value)
Sets the specified value to the
image field. |
NVGColor |
innerColor()
Returns a
NVGColor view of the innerColor field. |
NVGPaint |
innerColor(java.util.function.Consumer<NVGColor> consumer)
Passes the
innerColor field to the specified Consumer. |
NVGPaint |
innerColor(NVGColor value)
Copies the specified
NVGColor to the innerColor field. |
static NVGPaint |
malloc()
Returns a new
NVGPaint instance allocated with memAlloc. |
static NVGPaint.Buffer |
malloc(int capacity)
Returns a new
NVGPaint.Buffer instance allocated with memAlloc. |
static NVGPaint |
mallocStack()
Returns a new
NVGPaint instance allocated on the thread-local MemoryStack. |
static NVGPaint.Buffer |
mallocStack(int capacity)
Returns a new
NVGPaint.Buffer instance allocated on the thread-local MemoryStack. |
static NVGPaint.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
NVGPaint.Buffer instance allocated on the specified MemoryStack. |
static NVGPaint |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
NVGPaint instance allocated on the specified MemoryStack. |
static java.nio.FloatBuffer |
nextent(long struct)
Unsafe version of
extent(). |
static void |
nextent(long struct,
java.nio.FloatBuffer value)
Unsafe version of
extent. |
static float |
nextent(long struct,
int index)
Unsafe version of
extent. |
static void |
nextent(long struct,
int index,
float value)
Unsafe version of
extent. |
static float |
nfeather(long struct)
Unsafe version of
feather(). |
static void |
nfeather(long struct,
float value)
Unsafe version of
feather. |
static int |
nimage(long struct)
Unsafe version of
image(). |
static void |
nimage(long struct,
int value)
Unsafe version of
image. |
static NVGColor |
ninnerColor(long struct)
Unsafe version of
innerColor(). |
static void |
ninnerColor(long struct,
NVGColor value)
Unsafe version of
innerColor. |
static NVGColor |
nouterColor(long struct)
Unsafe version of
outerColor(). |
static void |
nouterColor(long struct,
NVGColor value)
Unsafe version of
outerColor. |
static float |
nradius(long struct)
Unsafe version of
radius(). |
static void |
nradius(long struct,
float value)
Unsafe version of
radius. |
static java.nio.FloatBuffer |
nxform(long struct)
Unsafe version of
xform(). |
static void |
nxform(long struct,
java.nio.FloatBuffer value)
Unsafe version of
xform. |
static float |
nxform(long struct,
int index)
Unsafe version of
xform. |
static void |
nxform(long struct,
int index,
float value)
Unsafe version of
xform. |
NVGColor |
outerColor()
Returns a
NVGColor view of the outerColor field. |
NVGPaint |
outerColor(java.util.function.Consumer<NVGColor> consumer)
Passes the
outerColor field to the specified Consumer. |
NVGPaint |
outerColor(NVGColor value)
Copies the specified
NVGColor to the outerColor field. |
float |
radius()
Returns the value of the
radius field. |
NVGPaint |
radius(float value)
Sets the specified value to the
radius field. |
NVGPaint |
set(java.nio.FloatBuffer xform,
java.nio.FloatBuffer extent,
float radius,
float feather,
NVGColor innerColor,
NVGColor outerColor,
int image)
Initializes this struct with the specified values.
|
NVGPaint |
set(NVGPaint src)
Copies the specified struct data to this struct.
|
int |
sizeof() |
java.nio.FloatBuffer |
xform()
Returns a
FloatBuffer view of the xform field. |
NVGPaint |
xform(java.nio.FloatBuffer value)
Copies the specified
FloatBuffer to the xform field. |
float |
xform(int index)
Returns the value at the specified index of the
xform field. |
NVGPaint |
xform(int index,
float value)
Sets the specified value at the specified index of the
xform field. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int XFORM
public static final int EXTENT
public static final int RADIUS
public static final int FEATHER
public static final int INNERCOLOR
public static final int OUTERCOLOR
public static final int IMAGE
public NVGPaint(java.nio.ByteBuffer container)
NVGPaint 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 xform()
FloatBuffer view of the xform field.public float xform(int index)
xform field.public java.nio.FloatBuffer extent()
FloatBuffer view of the extent field.public float extent(int index)
extent field.public float radius()
radius field.public float feather()
feather field.public int image()
image field.public NVGPaint xform(java.nio.FloatBuffer value)
FloatBuffer to the xform field.public NVGPaint xform(int index, float value)
xform field.public NVGPaint extent(java.nio.FloatBuffer value)
FloatBuffer to the extent field.public NVGPaint extent(int index, float value)
extent field.public NVGPaint radius(float value)
radius field.public NVGPaint feather(float value)
feather field.public NVGPaint innerColor(NVGColor value)
NVGColor to the innerColor field.public NVGPaint innerColor(java.util.function.Consumer<NVGColor> consumer)
innerColor field to the specified Consumer.public NVGPaint outerColor(NVGColor value)
NVGColor to the outerColor field.public NVGPaint outerColor(java.util.function.Consumer<NVGColor> consumer)
outerColor field to the specified Consumer.public NVGPaint image(int value)
image field.public NVGPaint set(java.nio.FloatBuffer xform, java.nio.FloatBuffer extent, float radius, float feather, NVGColor innerColor, NVGColor outerColor, int image)
public NVGPaint set(NVGPaint src)
src - the source structpublic static NVGPaint malloc()
NVGPaint instance allocated with memAlloc. The instance must be explicitly freed.public static NVGPaint calloc()
NVGPaint instance allocated with memCalloc. The instance must be explicitly freed.public static NVGPaint create()
NVGPaint instance allocated with BufferUtils.public static NVGPaint create(long address)
NVGPaint instance for the specified memory address.@Nullable public static NVGPaint createSafe(long address)
public static NVGPaint.Buffer malloc(int capacity)
NVGPaint.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static NVGPaint.Buffer calloc(int capacity)
NVGPaint.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static NVGPaint.Buffer create(int capacity)
NVGPaint.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static NVGPaint.Buffer create(long address, int capacity)
NVGPaint.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static NVGPaint.Buffer createSafe(long address, int capacity)
public static NVGPaint mallocStack()
NVGPaint instance allocated on the thread-local MemoryStack.public static NVGPaint callocStack()
NVGPaint instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static NVGPaint mallocStack(org.lwjgl.system.MemoryStack stack)
NVGPaint instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static NVGPaint callocStack(org.lwjgl.system.MemoryStack stack)
NVGPaint instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static NVGPaint.Buffer mallocStack(int capacity)
NVGPaint.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static NVGPaint.Buffer callocStack(int capacity)
NVGPaint.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static NVGPaint.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
NVGPaint.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static NVGPaint.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
NVGPaint.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 nxform(long struct)
xform().public static float nxform(long struct,
int index)
xform.public static java.nio.FloatBuffer nextent(long struct)
extent().public static float nextent(long struct,
int index)
extent.public static float nradius(long struct)
radius().public static float nfeather(long struct)
feather().public static NVGColor ninnerColor(long struct)
innerColor().public static NVGColor nouterColor(long struct)
outerColor().public static int nimage(long struct)
image().public static void nxform(long struct,
java.nio.FloatBuffer value)
xform.public static void nxform(long struct,
int index,
float value)
xform.public static void nextent(long struct,
java.nio.FloatBuffer value)
extent.public static void nextent(long struct,
int index,
float value)
extent.public static void nradius(long struct,
float value)
radius.public static void nfeather(long struct,
float value)
feather.public static void ninnerColor(long struct,
NVGColor value)
innerColor.public static void nouterColor(long struct,
NVGColor value)
outerColor.public static void nimage(long struct,
int value)
image.Copyright LWJGL. All Rights Reserved. License terms.