Package org.lwjgl.nanovg
Class NVGPaint
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<NVGPaint>
org.lwjgl.nanovg.NVGPaint
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class NVGPaint
extends org.lwjgl.system.Struct<NVGPaint>
implements org.lwjgl.system.NativeResource
A NanoVG paint.
Layout
struct NVGpaint {
float xform()[6];
float extent()[2];
float radius();
float feather();
NVGcolor innerColor();
NVGcolor outerColor();
int image();
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionNVGPaint(ByteBuffer container) Creates aNVGPaintinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic NVGPaintcalloc()Returns a newNVGPaintinstance allocated withmemCalloc.static NVGPaint.Buffercalloc(int capacity) Returns a newNVGPaint.Bufferinstance allocated withmemCalloc.static NVGPaint.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newNVGPaint.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NVGPaintcalloc(org.lwjgl.system.MemoryStack stack) Returns a newNVGPaintinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NVGPaintDeprecated.static NVGPaint.BuffercallocStack(int capacity) Deprecated.static NVGPaint.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static NVGPaintcallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.static NVGPaintcreate()Returns a newNVGPaintinstance allocated withBufferUtils.static NVGPaint.Buffercreate(int capacity) Returns a newNVGPaint.Bufferinstance allocated withBufferUtils.static NVGPaintcreate(long address) Returns a newNVGPaintinstance for the specified memory address.static NVGPaint.Buffercreate(long address, int capacity) Create aNVGPaint.Bufferinstance at the specified memory.static NVGPaintcreateSafe(long address) static NVGPaint.BuffercreateSafe(long address, int capacity) extent()the extentfloatextent(int index) the extentextent(int index, float value) Sets the specified value at the specified index of theextent()field.extent(FloatBuffer value) Copies the specifiedFloatBufferto theextent()field.floatfeather()the feather amountfeather(float value) Sets the specified value to thefeather()field.intimage()the image handleimage(int value) Sets the specified value to theimage()field.the inner colorinnerColor(Consumer<NVGColor> consumer) Passes theinnerColor()field to the specifiedConsumer.innerColor(NVGColor value) Copies the specifiedNVGColorto theinnerColor()field.static NVGPaintmalloc()Returns a newNVGPaintinstance allocated withmemAlloc.static NVGPaint.Buffermalloc(int capacity) Returns a newNVGPaint.Bufferinstance allocated withmemAlloc.static NVGPaint.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newNVGPaint.Bufferinstance allocated on the specifiedMemoryStack.static NVGPaintmalloc(org.lwjgl.system.MemoryStack stack) Returns a newNVGPaintinstance allocated on the specifiedMemoryStack.static NVGPaintDeprecated.static NVGPaint.BuffermallocStack(int capacity) Deprecated.static NVGPaint.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static NVGPaintmallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.static FloatBuffernextent(long struct) Unsafe version ofextent().static floatnextent(long struct, int index) Unsafe version ofextent.static voidnextent(long struct, int index, float value) Unsafe version ofextent.static voidnextent(long struct, FloatBuffer value) Unsafe version ofextent.static floatnfeather(long struct) Unsafe version offeather().static voidnfeather(long struct, float value) Unsafe version offeather.static intnimage(long struct) Unsafe version ofimage().static voidnimage(long struct, int value) Unsafe version ofimage.static NVGColorninnerColor(long struct) Unsafe version ofinnerColor().static voidninnerColor(long struct, NVGColor value) Unsafe version ofinnerColor.static NVGColornouterColor(long struct) Unsafe version ofouterColor().static voidnouterColor(long struct, NVGColor value) Unsafe version ofouterColor.static floatnradius(long struct) Unsafe version ofradius().static voidnradius(long struct, float value) Unsafe version ofradius.static FloatBuffernxform(long struct) Unsafe version ofxform().static floatnxform(long struct, int index) Unsafe version ofxform.static voidnxform(long struct, int index, float value) Unsafe version ofxform.static voidnxform(long struct, FloatBuffer value) Unsafe version ofxform.the outer colorouterColor(Consumer<NVGColor> consumer) Passes theouterColor()field to the specifiedConsumer.outerColor(NVGColor value) Copies the specifiedNVGColorto theouterColor()field.floatradius()the radiusradius(float value) Sets the specified value to theradius()field.set(FloatBuffer xform, FloatBuffer extent, float radius, float feather, NVGColor innerColor, NVGColor outerColor, int image) Initializes this struct with the specified values.Copies the specified struct data to this struct.intsizeof()xform()the transformation matrixfloatxform(int index) the transformation matrixxform(int index, float value) Sets the specified value at the specified index of thexform()field.xform(FloatBuffer value) Copies the specifiedFloatBufferto thexform()field.Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validateMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
XFORM
public static final int XFORMThe struct member offsets. -
EXTENT
public static final int EXTENTThe struct member offsets. -
RADIUS
public static final int RADIUSThe struct member offsets. -
FEATHER
public static final int FEATHERThe struct member offsets. -
INNERCOLOR
public static final int INNERCOLORThe struct member offsets. -
OUTERCOLOR
public static final int OUTERCOLORThe struct member offsets. -
IMAGE
public static final int IMAGEThe struct member offsets.
-
-
Constructor Details
-
NVGPaint
Creates aNVGPaintinstance 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 Details
-
sizeof
public int sizeof()- Specified by:
sizeofin classorg.lwjgl.system.Struct<NVGPaint>
-
xform
the transformation matrix -
xform
public float xform(int index) the transformation matrix -
extent
the extent -
extent
public float extent(int index) the extent -
radius
public float radius()the radius -
feather
public float feather()the feather amount -
innerColor
the inner color -
outerColor
the outer color -
image
public int image()the image handle -
xform
Copies the specifiedFloatBufferto thexform()field. -
xform
Sets the specified value at the specified index of thexform()field. -
extent
Copies the specifiedFloatBufferto theextent()field. -
extent
Sets the specified value at the specified index of theextent()field. -
radius
Sets the specified value to theradius()field. -
feather
Sets the specified value to thefeather()field. -
innerColor
Copies the specifiedNVGColorto theinnerColor()field. -
innerColor
Passes theinnerColor()field to the specifiedConsumer. -
outerColor
Copies the specifiedNVGColorto theouterColor()field. -
outerColor
Passes theouterColor()field to the specifiedConsumer. -
image
Sets the specified value to theimage()field. -
set
public NVGPaint set(FloatBuffer xform, FloatBuffer extent, float radius, float feather, NVGColor innerColor, NVGColor outerColor, int image) Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newNVGPaintinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newNVGPaintinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newNVGPaintinstance allocated withBufferUtils. -
create
Returns a newNVGPaintinstance for the specified memory address. -
createSafe
-
malloc
Returns a newNVGPaint.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newNVGPaint.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newNVGPaint.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aNVGPaint.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
mallocStack
@Deprecated public static NVGPaint.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 NVGPaint.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
malloc
Returns a newNVGPaintinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newNVGPaintinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newNVGPaint.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newNVGPaint.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nxform
Unsafe version ofxform(). -
nxform
public static float nxform(long struct, int index) Unsafe version ofxform. -
nextent
Unsafe version ofextent(). -
nextent
public static float nextent(long struct, int index) Unsafe version ofextent. -
nradius
public static float nradius(long struct) Unsafe version ofradius(). -
nfeather
public static float nfeather(long struct) Unsafe version offeather(). -
ninnerColor
Unsafe version ofinnerColor(). -
nouterColor
Unsafe version ofouterColor(). -
nimage
public static int nimage(long struct) Unsafe version ofimage(). -
nxform
Unsafe version ofxform. -
nxform
public static void nxform(long struct, int index, float value) Unsafe version ofxform. -
nextent
Unsafe version ofextent. -
nextent
public static void nextent(long struct, int index, float value) Unsafe version ofextent. -
nradius
public static void nradius(long struct, float value) Unsafe version ofradius. -
nfeather
public static void nfeather(long struct, float value) Unsafe version offeather. -
ninnerColor
Unsafe version ofinnerColor. -
nouterColor
Unsafe version ofouterColor. -
nimage
public static void nimage(long struct, int value) Unsafe version ofimage.
-