Package org.lwjgl.nanovg
Class NVGPaint.Buffer
- All Implemented Interfaces:
AutoCloseable
,Iterable<NVGPaint>
,NativeResource
,Pointer
- Enclosing class:
NVGPaint
public static class NVGPaint.Buffer
extends StructBuffer<NVGPaint,NVGPaint.Buffer>
implements NativeResource
An array of
NVGPaint
structs.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorsConstructorDescriptionBuffer
(long address, int cap) Buffer
(ByteBuffer container) Creates a newNVGPaint.Buffer
instance backed by the specified container. -
Method Summary
Modifier and TypeMethodDescriptionextent()
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.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.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.StructBuffer
apply, apply, forEach, get, get, get, get, iterator, parallelStream, put, put, sizeof, spliterator, stream
Methods inherited from class org.lwjgl.system.CustomBuffer
address, address, address0, capacity, clear, compact, duplicate, flip, free, hasRemaining, limit, limit, mark, position, position, put, remaining, reset, rewind, slice, slice, toString
Methods inherited from class org.lwjgl.system.Pointer.Default
equals, hashCode
Methods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Constructor Details
-
Buffer
Creates a newNVGPaint.Buffer
instance backed by the specified container.Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided by
NVGPaint.SIZEOF
, and its mark will be undefined.The created buffer instance holds a strong reference to the container object.
-
Buffer
public Buffer(long address, int cap)
-
-
Method Details
-
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.
-