Package org.lwjgl.nanovg
Class NVGPaint
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.nanovg.NVGPaint
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class NVGPaint extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceA NanoVG paint.Layout
struct NVGpaint { floatxform()[6]; floatextent()[2]; floatradius(); floatfeather();NVGcolorinnerColor();NVGcolorouterColor(); intimage(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNVGPaint.BufferAn array ofNVGPaintstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intEXTENT
FEATHER
IMAGE
INNERCOLOR
OUTERCOLOR
RADIUSThe struct member offsets.static intSIZEOFThe struct size in bytes.static intXFORMThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description NVGPaint(java.nio.ByteBuffer container)Creates aNVGPaintinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static NVGPaintcalloc()Returns a newNVGPaintinstance allocated withmemCalloc.static NVGPaint.Buffercalloc(int capacity)Returns a newNVGPaint.Bufferinstance allocated withmemCalloc.static NVGPaint.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newNVGPaint.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NVGPaintcalloc(org.lwjgl.system.MemoryStack stack)Returns a newNVGPaintinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NVGPaintcallocStack()Deprecated.static NVGPaint.BuffercallocStack(int capacity)Deprecated.static NVGPaint.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static NVGPaintcallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.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 NVGPaintcreateSafe(long address)static NVGPaint.BuffercreateSafe(long address, int capacity)java.nio.FloatBufferextent()the extentfloatextent(int index)the extentNVGPaintextent(int index, float value)Sets the specified value at the specified index of theextent()field.NVGPaintextent(java.nio.FloatBuffer value)Copies the specifiedFloatBufferto theextent()field.floatfeather()the feather amountNVGPaintfeather(float value)Sets the specified value to thefeather()field.intimage()the image handleNVGPaintimage(int value)Sets the specified value to theimage()field.NVGColorinnerColor()the inner colorNVGPaintinnerColor(java.util.function.Consumer<NVGColor> consumer)Passes theinnerColor()field to the specifiedConsumer.NVGPaintinnerColor(NVGColor value)Copies the specifiedNVGColorto theinnerColor()field.static NVGPaintmalloc()Returns a newNVGPaintinstance allocated withmemAlloc.static NVGPaint.Buffermalloc(int capacity)Returns a newNVGPaint.Bufferinstance allocated withmemAlloc.static NVGPaint.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newNVGPaint.Bufferinstance allocated on the specifiedMemoryStack.static NVGPaintmalloc(org.lwjgl.system.MemoryStack stack)Returns a newNVGPaintinstance allocated on the specifiedMemoryStack.static NVGPaintmallocStack()Deprecated.static NVGPaint.BuffermallocStack(int capacity)Deprecated.static NVGPaint.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static NVGPaintmallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static java.nio.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, java.nio.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 java.nio.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, java.nio.FloatBuffer value)Unsafe version ofxform.NVGColorouterColor()the outer colorNVGPaintouterColor(java.util.function.Consumer<NVGColor> consumer)Passes theouterColor()field to the specifiedConsumer.NVGPaintouterColor(NVGColor value)Copies the specifiedNVGColorto theouterColor()field.floatradius()the radiusNVGPaintradius(float value)Sets the specified value to theradius()field.NVGPaintset(java.nio.FloatBuffer xform, java.nio.FloatBuffer extent, float radius, float feather, NVGColor innerColor, NVGColor outerColor, int image)Initializes this struct with the specified values.NVGPaintset(NVGPaint src)Copies the specified struct data to this struct.intsizeof()java.nio.FloatBufferxform()the transformation matrixfloatxform(int index)the transformation matrixNVGPaintxform(int index, float value)Sets the specified value at the specified index of thexform()field.NVGPaintxform(java.nio.FloatBuffer value)Copies the specifiedFloatBufferto thexform()field.
-
-
-
Constructor Detail
-
NVGPaint
public NVGPaint(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
xform
public java.nio.FloatBuffer xform() public float xform(int index)
the transformation matrix
-
extent
public java.nio.FloatBuffer extent() public float extent(int index)
the extent
-
radius
public float radius()
the radius
-
feather
public float feather()
the feather amount
-
innerColor
public NVGColor innerColor()
the inner color
-
outerColor
public NVGColor outerColor()
the outer color
-
image
public int image()
the image handle
-
xform
public NVGPaint xform(java.nio.FloatBuffer value)
Copies the specifiedFloatBufferto thexform()field.
-
xform
public NVGPaint xform(int index, float value)
Sets the specified value at the specified index of thexform()field.
-
extent
public NVGPaint extent(java.nio.FloatBuffer value)
Copies the specifiedFloatBufferto theextent()field.
-
extent
public NVGPaint extent(int index, float value)
Sets the specified value at the specified index of theextent()field.
-
innerColor
public NVGPaint innerColor(NVGColor value)
Copies the specifiedNVGColorto theinnerColor()field.
-
innerColor
public NVGPaint innerColor(java.util.function.Consumer<NVGColor> consumer)
Passes theinnerColor()field to the specifiedConsumer.
-
outerColor
public NVGPaint outerColor(NVGColor value)
Copies the specifiedNVGColorto theouterColor()field.
-
outerColor
public NVGPaint outerColor(java.util.function.Consumer<NVGColor> consumer)
Passes theouterColor()field to the specifiedConsumer.
-
set
public NVGPaint set(java.nio.FloatBuffer xform, java.nio.FloatBuffer extent, float radius, float feather, NVGColor innerColor, NVGColor outerColor, int image)
Initializes this struct with the specified values.
-
set
public NVGPaint set(NVGPaint src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static NVGPaint malloc()
Returns a newNVGPaintinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static NVGPaint calloc()
Returns a newNVGPaintinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static NVGPaint create()
Returns a newNVGPaintinstance allocated withBufferUtils.
-
create
public static NVGPaint create(long address)
Returns a newNVGPaintinstance for the specified memory address.
-
createSafe
@Nullable public static NVGPaint createSafe(long address)
-
malloc
public static NVGPaint.Buffer malloc(int capacity)
Returns a newNVGPaint.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static NVGPaint.Buffer calloc(int capacity)
Returns a newNVGPaint.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static NVGPaint.Buffer create(int capacity)
Returns a newNVGPaint.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static NVGPaint.Buffer create(long address, int capacity)
Create aNVGPaint.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static NVGPaint.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static NVGPaint mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static NVGPaint callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static NVGPaint mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static NVGPaint callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static NVGPaint.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static NVGPaint.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static NVGPaint.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static NVGPaint.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static NVGPaint malloc(org.lwjgl.system.MemoryStack stack)
Returns a newNVGPaintinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static NVGPaint calloc(org.lwjgl.system.MemoryStack stack)
Returns a newNVGPaintinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static NVGPaint.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNVGPaint.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static NVGPaint.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNVGPaint.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nxform
public static java.nio.FloatBuffer nxform(long struct)
Unsafe version ofxform().
-
nxform
public static float nxform(long struct, int index)Unsafe version ofxform.
-
nextent
public static java.nio.FloatBuffer nextent(long struct)
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
public static NVGColor ninnerColor(long struct)
Unsafe version ofinnerColor().
-
nouterColor
public static NVGColor nouterColor(long struct)
Unsafe version ofouterColor().
-
nimage
public static int nimage(long struct)
Unsafe version ofimage().
-
nxform
public static void nxform(long struct, java.nio.FloatBuffer value)Unsafe version ofxform.
-
nxform
public static void nxform(long struct, int index, float value)Unsafe version ofxform.
-
nextent
public static void nextent(long struct, java.nio.FloatBuffer value)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
public static void ninnerColor(long struct, NVGColor value)Unsafe version ofinnerColor.
-
nouterColor
public static void nouterColor(long struct, NVGColor value)Unsafe version ofouterColor.
-
nimage
public static void nimage(long struct, int value)Unsafe version ofimage.
-
-