Top Description Inners Fields Constructors Methods
org.lwjgl.nanovg

public Class NVGPaint

extends Struct<NVGPaint>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable
Annotations
@NativeType:struct NVGpaint
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

A NanoVG paint.

Layout


struct NVGpaint {
    float xform[6];
    float extent[2];
    float radius;
    float feather;
    NVGcolor innerColor;
    NVGcolor outerColor;
    int image;
}

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
NVGPaint.Buffer

An array of NVGPaint structs.

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
EXTENT

The struct member offsets.

public static final int
FEATHER

The struct member offsets.

public static final int
IMAGE

The struct member offsets.

public static final int
INNERCOLOR

The struct member offsets.

public static final int
OUTERCOLOR

The struct member offsets.

public static final int
RADIUS

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

public static final int
XFORM

The struct member offsets.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

AccessConstructor and Description
protected
NVGPaint(long address, ByteBuffer container)

public
NVGPaint(ByteBuffer container)

Creates a NVGPaint instance at the current position of the specified ByteBuffer container.

Method Summary

Modifier and TypeMethod and Description
public static NVGPaint
calloc()

Returns a new NVGPaint instance allocated with memCalloc.

public static NVGPaint.Buffer
calloc(int
the buffer capacity
capacity
)

Returns a new NVGPaint.Buffer instance allocated with memCalloc.

public static NVGPaint
calloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new NVGPaint instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static NVGPaint.Buffer
calloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new NVGPaint.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static NVGPaint
callocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static NVGPaint
callocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static NVGPaint.Buffer
callocStack(int capacity)

Deprecated
Deprecated for removal in 3.4.0.
public static NVGPaint.Buffer
callocStack(int capacity, MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
protected NVGPaint
create(long
the struct memory address
address
,
ByteBuffer
an optional container buffer, to be referenced strongly by the struct instance.
container
)

Implements abstract org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.
public static NVGPaint
create()

Returns a new NVGPaint instance allocated with BufferUtils.

public static NVGPaint
create(long address)

Returns a new NVGPaint instance for the specified memory address.

public static NVGPaint.Buffer
create(int
the buffer capacity
capacity
)

Returns a new NVGPaint.Buffer instance allocated with BufferUtils.

public static NVGPaint.Buffer
create(long
the memory address
address
,
int
the buffer capacity
capacity
)

Create a NVGPaint.Buffer instance at the specified memory.

public static NVGPaint
createSafe(long address)

Like create, but returns null if address is NULL.

public static NVGPaint.Buffer
createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

public FloatBuffer
extent()

the extent

public float
extent(int index)

the extent

public NVGPaint
extent(FloatBuffer value)

Copies the specified FloatBuffer to the extent field.

public NVGPaint
extent(int index, float value)

Sets the specified value at the specified index of the extent field.

public float
feather()

the feather amount

public NVGPaint
feather(float value)

Sets the specified value to the feather field.

public int
image()

the image handle

public NVGPaint
image(int value)

Sets the specified value to the image field.

public NVGColor
innerColor()

the inner color

public NVGPaint
innerColor(NVGColor value)

Copies the specified NVGColor to the innerColor field.

public NVGPaint
innerColor(Consumer<NVGColor> consumer)

Passes the innerColor field to the specified Consumer.

public static NVGPaint
malloc()

Returns a new NVGPaint instance allocated with memAlloc.

public static NVGPaint.Buffer
malloc(int
the buffer capacity
capacity
)

Returns a new NVGPaint.Buffer instance allocated with memAlloc.

public static NVGPaint
malloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new NVGPaint instance allocated on the specified MemoryStack.

public static NVGPaint.Buffer
malloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new NVGPaint.Buffer instance allocated on the specified MemoryStack.

public static NVGPaint
mallocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static NVGPaint
mallocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static NVGPaint.Buffer
mallocStack(int capacity)

Deprecated
Deprecated for removal in 3.4.0.
public static NVGPaint.Buffer
mallocStack(int capacity, MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static FloatBuffer
nextent(long struct)

Unsafe version of extent.

public static float
nextent(long struct, int index)

Unsafe version of extent.

public static void
nextent(long struct, FloatBuffer value)

Unsafe version of extent.

public static void
nextent(long struct, int index, float value)

Unsafe version of extent.

public static float
nfeather(long struct)

Unsafe version of feather.

public static void
nfeather(long struct, float value)

Unsafe version of feather.

public static int
nimage(long struct)

Unsafe version of image.

public static void
nimage(long struct, int value)

Unsafe version of image.

public static NVGColor
ninnerColor(long struct)

Unsafe version of innerColor.

public static void
ninnerColor(long struct, NVGColor value)

Unsafe version of innerColor.

public static NVGColor
nouterColor(long struct)

Unsafe version of outerColor.

public static void
nouterColor(long struct, NVGColor value)

Unsafe version of outerColor.

public static float
nradius(long struct)

Unsafe version of radius.

public static void
nradius(long struct, float value)

Unsafe version of radius.

public static FloatBuffer
nxform(long struct)

Unsafe version of xform.

public static float
nxform(long struct, int index)

Unsafe version of xform.

public static void
nxform(long struct, FloatBuffer value)

Unsafe version of xform.

public static void
nxform(long struct, int index, float value)

Unsafe version of xform.

public NVGColor
outerColor()

the outer color

public NVGPaint
outerColor(NVGColor value)

Copies the specified NVGColor to the outerColor field.

public NVGPaint
outerColor(Consumer<NVGColor> consumer)

Passes the outerColor field to the specified Consumer.

public float
radius()

the radius

public NVGPaint
radius(float value)

Sets the specified value to the radius field.

public NVGPaint
set(FloatBuffer xform, FloatBuffer extent, float radius, float feather, NVGColor innerColor, NVGColor outerColor, int image)

Initializes this struct with the specified values.

public NVGPaint

Returns:

this struct
set
(NVGPaint
the source struct
src
)

Copies the specified struct data to this struct.

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
public FloatBuffer
xform()

the transformation matrix

public float
xform(int index)

the transformation matrix

public NVGPaint
xform(FloatBuffer value)

Copies the specified FloatBuffer to the xform field.

public NVGPaint
xform(int index, float value)

Sets the specified value at the specified index of the xform field.

Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate