Package org.lwjgl.nanovg
Class NVGPaint
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
struct NVGpaint {
float xform[6];
float extent[2];
float radius;
float feather;
{@link NVGColor NVGcolor} innerColor;
{@link NVGColor NVGcolor} outerColor;
int image;
}
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct size in bytes.static final int
The 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 aNVGPaint
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic NVGPaint
calloc()
Returns a newNVGPaint
instance allocated withmemCalloc
.static NVGPaint.Buffer
calloc
(int capacity) Returns a newNVGPaint.Buffer
instance allocated withmemCalloc
.static NVGPaint.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newNVGPaint.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static NVGPaint
calloc
(MemoryStack stack) Returns a newNVGPaint
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static NVGPaint
Deprecated.static NVGPaint.Buffer
callocStack
(int capacity) Deprecated.static NVGPaint.Buffer
callocStack
(int capacity, MemoryStack stack) Deprecated.static NVGPaint
callocStack
(MemoryStack stack) Deprecated.static NVGPaint
create()
Returns a newNVGPaint
instance allocated withBufferUtils
.static NVGPaint.Buffer
create
(int capacity) Returns a newNVGPaint.Buffer
instance allocated withBufferUtils
.static NVGPaint
create
(long address) Returns a newNVGPaint
instance for the specified memory address.static NVGPaint.Buffer
create
(long address, int capacity) Create aNVGPaint.Buffer
instance at the specified memory.static @Nullable NVGPaint
createSafe
(long address) static @Nullable NVGPaint.Buffer
createSafe
(long address, int capacity) extent()
float
extent
(int index) extent
(int index, float value) Sets the specified value at the specified index of theextent
field.extent
(FloatBuffer value) Copies the specifiedFloatBuffer
to theextent
field.float
feather()
feather
(float value) Sets the specified value to thefeather
field.int
image()
image
(int value) Sets the specified value to theimage
field.innerColor
(Consumer<NVGColor> consumer) Passes theinnerColor
field to the specifiedConsumer
.innerColor
(NVGColor value) Copies the specifiedNVGColor
to theinnerColor
field.static NVGPaint
malloc()
Returns a newNVGPaint
instance allocated withmemAlloc
.static NVGPaint.Buffer
malloc
(int capacity) Returns a newNVGPaint.Buffer
instance allocated withmemAlloc
.static NVGPaint.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newNVGPaint.Buffer
instance allocated on the specifiedMemoryStack
.static NVGPaint
malloc
(MemoryStack stack) Returns a newNVGPaint
instance allocated on the specifiedMemoryStack
.static NVGPaint
Deprecated.static NVGPaint.Buffer
mallocStack
(int capacity) Deprecated.static NVGPaint.Buffer
mallocStack
(int capacity, MemoryStack stack) Deprecated.static NVGPaint
mallocStack
(MemoryStack stack) Deprecated.static FloatBuffer
nextent
(long struct) Unsafe version ofextent()
.static float
nextent
(long struct, int index) Unsafe version ofextent
.static void
nextent
(long struct, int index, float value) Unsafe version ofextent
.static void
nextent
(long struct, FloatBuffer value) Unsafe version ofextent
.static float
nfeather
(long struct) Unsafe version offeather()
.static void
nfeather
(long struct, float value) Unsafe version offeather
.static int
nimage
(long struct) Unsafe version ofimage()
.static void
nimage
(long struct, int value) Unsafe version ofimage
.static NVGColor
ninnerColor
(long struct) Unsafe version ofinnerColor()
.static void
ninnerColor
(long struct, NVGColor value) Unsafe version ofinnerColor
.static NVGColor
nouterColor
(long struct) Unsafe version ofouterColor()
.static void
nouterColor
(long struct, NVGColor value) Unsafe version ofouterColor
.static float
nradius
(long struct) Unsafe version ofradius()
.static void
nradius
(long struct, float value) Unsafe version ofradius
.static FloatBuffer
nxform
(long struct) Unsafe version ofxform()
.static float
nxform
(long struct, int index) Unsafe version ofxform
.static void
nxform
(long struct, int index, float value) Unsafe version ofxform
.static void
nxform
(long struct, FloatBuffer value) Unsafe version ofxform
.outerColor
(Consumer<NVGColor> consumer) Passes theouterColor
field to the specifiedConsumer
.outerColor
(NVGColor value) Copies the specifiedNVGColor
to theouterColor
field.float
radius()
radius
(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.int
sizeof()
Returnssizeof(struct)
.xform()
float
xform
(int index) xform
(int index, float value) Sets the specified value at the specified index of thexform
field.xform
(FloatBuffer value) Copies the specifiedFloatBuffer
to thexform
field.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods 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 aNVGPaint
instance at the current position of the specifiedByteBuffer
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.
-
-
Method Details
-
sizeof
public int sizeof()Description copied from class:Struct
Returnssizeof(struct)
. -
xform
- Returns:
- a
FloatBuffer
view of thexform
field.
-
xform
public float xform(int index) - Returns:
- the value at the specified index of the
xform
field.
-
extent
- Returns:
- a
FloatBuffer
view of theextent
field.
-
extent
public float extent(int index) - Returns:
- the value at the specified index of the
extent
field.
-
radius
public float radius()- Returns:
- the value of the
radius
field.
-
feather
public float feather()- Returns:
- the value of the
feather
field.
-
innerColor
- Returns:
- a
NVGColor
view of theinnerColor
field.
-
outerColor
- Returns:
- a
NVGColor
view of theouterColor
field.
-
image
public int image()- Returns:
- the value of the
image
field.
-
xform
Copies the specifiedFloatBuffer
to thexform
field. -
xform
Sets the specified value at the specified index of thexform
field. -
extent
Copies the specifiedFloatBuffer
to 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 specifiedNVGColor
to theinnerColor
field. -
innerColor
Passes theinnerColor
field to the specifiedConsumer
. -
outerColor
Copies the specifiedNVGColor
to 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 newNVGPaint
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newNVGPaint
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newNVGPaint
instance allocated withBufferUtils
. -
create
Returns a newNVGPaint
instance for the specified memory address. -
createSafe
-
malloc
Returns a newNVGPaint.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newNVGPaint.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newNVGPaint.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aNVGPaint.Buffer
instance 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.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
malloc
Returns a newNVGPaint
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newNVGPaint
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newNVGPaint.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newNVGPaint.Buffer
instance allocated on the specifiedMemoryStack
and 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
.
-