Package org.lwjgl.nanovg
Class NVGPaint.Buffer
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.CustomBuffer<SELF>
-
- org.lwjgl.system.StructBuffer<NVGPaint,NVGPaint.Buffer>
-
- org.lwjgl.nanovg.NVGPaint.Buffer
-
- All Implemented Interfaces:
java.lang.AutoCloseable,java.lang.Iterable<NVGPaint>,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
- Enclosing class:
- NVGPaint
public static class NVGPaint.Buffer extends org.lwjgl.system.StructBuffer<NVGPaint,NVGPaint.Buffer> implements org.lwjgl.system.NativeResource
An array ofNVGPaintstructs.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.FloatBufferextent()floatextent(int index)NVGPaint.Bufferextent(int index, float value)Sets the specified value at the specified index of theNVGPaint.extent()field.NVGPaint.Bufferextent(java.nio.FloatBuffer value)Copies the specifiedFloatBufferto theNVGPaint.extent()field.floatfeather()NVGPaint.Bufferfeather(float value)Sets the specified value to theNVGPaint.feather()field.intimage()NVGPaint.Bufferimage(int value)Sets the specified value to theNVGPaint.image()field.NVGColorinnerColor()NVGPaint.BufferinnerColor(java.util.function.Consumer<NVGColor> consumer)Passes theNVGPaint.innerColor()field to the specifiedConsumer.NVGPaint.BufferinnerColor(NVGColor value)Copies the specifiedNVGColorto theNVGPaint.innerColor()field.NVGColorouterColor()NVGPaint.BufferouterColor(java.util.function.Consumer<NVGColor> consumer)Passes theNVGPaint.outerColor()field to the specifiedConsumer.NVGPaint.BufferouterColor(NVGColor value)Copies the specifiedNVGColorto theNVGPaint.outerColor()field.floatradius()NVGPaint.Bufferradius(float value)Sets the specified value to theNVGPaint.radius()field.java.nio.FloatBufferxform()floatxform(int index)NVGPaint.Bufferxform(int index, float value)Sets the specified value at the specified index of theNVGPaint.xform()field.NVGPaint.Bufferxform(java.nio.FloatBuffer value)Copies the specifiedFloatBufferto theNVGPaint.xform()field.
-
-
-
Constructor Detail
-
Buffer
public Buffer(java.nio.ByteBuffer container)
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 byNVGPaint.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 Detail
-
xform
public java.nio.FloatBuffer xform()
- Returns:
- a
FloatBufferview of theNVGPaint.xform()field.
-
xform
public float xform(int index)
- Returns:
- the value at the specified index of the
NVGPaint.xform()field.
-
extent
public java.nio.FloatBuffer extent()
- Returns:
- a
FloatBufferview of theNVGPaint.extent()field.
-
extent
public float extent(int index)
- Returns:
- the value at the specified index of the
NVGPaint.extent()field.
-
radius
public float radius()
- Returns:
- the value of the
NVGPaint.radius()field.
-
feather
public float feather()
- Returns:
- the value of the
NVGPaint.feather()field.
-
innerColor
public NVGColor innerColor()
- Returns:
- a
NVGColorview of theNVGPaint.innerColor()field.
-
outerColor
public NVGColor outerColor()
- Returns:
- a
NVGColorview of theNVGPaint.outerColor()field.
-
image
public int image()
- Returns:
- the value of the
NVGPaint.image()field.
-
xform
public NVGPaint.Buffer xform(java.nio.FloatBuffer value)
Copies the specifiedFloatBufferto theNVGPaint.xform()field.
-
xform
public NVGPaint.Buffer xform(int index, float value)
Sets the specified value at the specified index of theNVGPaint.xform()field.
-
extent
public NVGPaint.Buffer extent(java.nio.FloatBuffer value)
Copies the specifiedFloatBufferto theNVGPaint.extent()field.
-
extent
public NVGPaint.Buffer extent(int index, float value)
Sets the specified value at the specified index of theNVGPaint.extent()field.
-
radius
public NVGPaint.Buffer radius(float value)
Sets the specified value to theNVGPaint.radius()field.
-
feather
public NVGPaint.Buffer feather(float value)
Sets the specified value to theNVGPaint.feather()field.
-
innerColor
public NVGPaint.Buffer innerColor(NVGColor value)
Copies the specifiedNVGColorto theNVGPaint.innerColor()field.
-
innerColor
public NVGPaint.Buffer innerColor(java.util.function.Consumer<NVGColor> consumer)
Passes theNVGPaint.innerColor()field to the specifiedConsumer.
-
outerColor
public NVGPaint.Buffer outerColor(NVGColor value)
Copies the specifiedNVGColorto theNVGPaint.outerColor()field.
-
outerColor
public NVGPaint.Buffer outerColor(java.util.function.Consumer<NVGColor> consumer)
Passes theNVGPaint.outerColor()field to the specifiedConsumer.
-
image
public NVGPaint.Buffer image(int value)
Sets the specified value to theNVGPaint.image()field.
-
-