Package org.lwjgl.nanovg
Class NVGPaint
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
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, MemoryStack stack) Returns a newNVGPaint.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NVGPaintcalloc(MemoryStack stack) Returns a newNVGPaintinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.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 @Nullable NVGPaintcreateSafe(long address) static @Nullable NVGPaint.BuffercreateSafe(long address, int capacity) extent()floatextent(int index) extent(int index, float value) Sets the specified value at the specified index of theextentfield.extent(FloatBuffer value) Copies the specifiedFloatBufferto theextentfield.floatfeather()feather(float value) Sets the specified value to thefeatherfield.intimage()image(int value) Sets the specified value to theimagefield.innerColor(Consumer<NVGColor> consumer) Passes theinnerColorfield to the specifiedConsumer.innerColor(NVGColor value) Copies the specifiedNVGColorto theinnerColorfield.static NVGPaintmalloc()Returns a newNVGPaintinstance allocated withmemAlloc.static NVGPaint.Buffermalloc(int capacity) Returns a newNVGPaint.Bufferinstance allocated withmemAlloc.static NVGPaint.Buffermalloc(int capacity, MemoryStack stack) Returns a newNVGPaint.Bufferinstance allocated on the specifiedMemoryStack.static NVGPaintmalloc(MemoryStack stack) Returns a newNVGPaintinstance allocated on the specifiedMemoryStack.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.outerColor(Consumer<NVGColor> consumer) Passes theouterColorfield to the specifiedConsumer.outerColor(NVGColor value) Copies the specifiedNVGColorto theouterColorfield.floatradius()radius(float value) Sets the specified value to theradiusfield.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()Returnssizeof(struct).xform()floatxform(int index) xform(int index, float value) Sets the specified value at the specified index of thexformfield.xform(FloatBuffer value) Copies the specifiedFloatBufferto thexformfield.Methods 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()Description copied from class:StructReturnssizeof(struct). -
xform
- Returns:
- a
FloatBufferview of thexformfield.
-
xform
public float xform(int index) - Returns:
- the value at the specified index of the
xformfield.
-
extent
- Returns:
- a
FloatBufferview of theextentfield.
-
extent
public float extent(int index) - Returns:
- the value at the specified index of the
extentfield.
-
radius
public float radius()- Returns:
- the value of the
radiusfield.
-
feather
public float feather()- Returns:
- the value of the
featherfield.
-
innerColor
- Returns:
- a
NVGColorview of theinnerColorfield.
-
outerColor
- Returns:
- a
NVGColorview of theouterColorfield.
-
image
public int image()- Returns:
- the value of the
imagefield.
-
xform
Copies the specifiedFloatBufferto thexformfield. -
xform
Sets the specified value at the specified index of thexformfield. -
extent
Copies the specifiedFloatBufferto theextentfield. -
extent
Sets the specified value at the specified index of theextentfield. -
radius
Sets the specified value to theradiusfield. -
feather
Sets the specified value to thefeatherfield. -
innerColor
Copies the specifiedNVGColorto theinnerColorfield. -
innerColor
Passes theinnerColorfield to the specifiedConsumer. -
outerColor
Copies the specifiedNVGColorto theouterColorfield. -
outerColor
Passes theouterColorfield to the specifiedConsumer. -
image
Sets the specified value to theimagefield. -
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
-
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.
-