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.Bufferinstance backed by the specified container. -
Method Summary
Modifier and TypeMethodDescriptionextent()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.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.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.StructBuffer
apply, apply, forEach, get, get, get, get, iterator, parallelStream, put, put, sizeof, spliterator, streamMethods 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, toStringMethods inherited from class org.lwjgl.system.Pointer.Default
equals, hashCodeMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Constructor Details
-
Buffer
Creates a newNVGPaint.Bufferinstance 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
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.
-