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, NativeResource, Pointer
public class NVGPaint extends Struct
A NanoVG paint.Member documentation
xform– the transformation matrixextent– the extentradius– the radiusfeather– the feather amountinnerColor– the inner colorouterColor– the outer colorimage– the image handle
Layout
struct NVGpaint { float[6] xform; float[2] extent; float radius; float feather;NVGcolorinnerColor;NVGcolorouterColor; int image; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classNVGPaint.BufferAn array ofNVGPaintstructs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static intSIZEOFThe struct size in bytes.-
Fields inherited from interface org.lwjgl.system.Pointer
POINTER_SHIFT, POINTER_SIZE
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static NVGPaintcalloc()static NVGPaint.Buffercalloc(int capacity)Returns a newNVGPaint.Bufferinstance allocated withmemCalloc.static NVGPaintcallocStack()Returns a newNVGPaintinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static NVGPaint.BuffercallocStack(int capacity)Returns a newNVGPaint.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static NVGPaint.BuffercallocStack(int capacity, MemoryStack stack)Returns a newNVGPaint.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NVGPaintcallocStack(MemoryStack stack)Returns a newNVGPaintinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NVGPaintcreate()Returns a newNVGPaintinstance allocated withBufferUtils.static NVGPaint.Buffercreate(int capacity)Returns a newNVGPaint.Bufferinstance allocated withBufferUtils.static NVGPaintcreate(long address)static NVGPaint.Buffercreate(long address, int capacity)Create aNVGPaint.Bufferinstance at the specified memory.java.nio.FloatBufferextent()Returns aFloatBufferview of theextentfield.NVGPaintextent(java.nio.FloatBuffer value)Copies the specifiedFloatBufferto theextentfield.floatextent(int index)Returns the value at the specified index of theextentfield.NVGPaintextent(int index, float value)Sets the specified value at the specified index of theextentfield.floatfeather()Returns the value of thefeatherfield.NVGPaintfeather(float value)Sets the specified value to thefeatherfield.intimage()Returns the value of theimagefield.NVGPaintimage(int value)Sets the specified value to theimagefield.NVGColorinnerColor()Returns aNVGColorview of theinnerColorfield.NVGPaintinnerColor(NVGColor value)Copies the specifiedNVGColorto theinnerColorfield.static NVGPaintmalloc()static NVGPaint.Buffermalloc(int capacity)Returns a newNVGPaint.Bufferinstance allocated withmemAlloc.static NVGPaintmallocStack()Returns a newNVGPaintinstance allocated on the thread-localMemoryStack.static NVGPaint.BuffermallocStack(int capacity)Returns a newNVGPaint.Bufferinstance allocated on the thread-localMemoryStack.static NVGPaint.BuffermallocStack(int capacity, MemoryStack stack)Returns a newNVGPaint.Bufferinstance allocated on the specifiedMemoryStack.static NVGPaintmallocStack(MemoryStack stack)Returns a newNVGPaintinstance allocated on the specifiedMemoryStack.NVGPaintnset(long struct)Unsafe version ofset.NVGColorouterColor()Returns aNVGColorview of theouterColorfield.NVGPaintouterColor(NVGColor value)Copies the specifiedNVGColorto theouterColorfield.floatradius()Returns the value of theradiusfield.NVGPaintradius(float value)Sets the specified value to theradiusfield.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()Returns thesizeof(struct).java.nio.FloatBufferxform()Returns aFloatBufferview of thexformfield.NVGPaintxform(java.nio.FloatBuffer value)Copies the specifiedFloatBufferto thexformfield.floatxform(int index)Returns the value at the specified index of thexformfield.NVGPaintxform(int index, float value)Sets the specified value at the specified index of thexformfield.-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Methods inherited from interface org.lwjgl.system.NativeResource
close
-
-
-
-
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()
Description copied from class:StructReturns thesizeof(struct).
-
xform
public java.nio.FloatBuffer xform()
Returns aFloatBufferview of thexformfield.
-
xform
public float xform(int index)
Returns the value at the specified index of thexformfield.
-
extent
public java.nio.FloatBuffer extent()
Returns aFloatBufferview of theextentfield.
-
extent
public float extent(int index)
Returns the value at the specified index of theextentfield.
-
radius
public float radius()
Returns the value of theradiusfield.
-
feather
public float feather()
Returns the value of thefeatherfield.
-
image
public int image()
Returns the value of theimagefield.
-
xform
public NVGPaint xform(java.nio.FloatBuffer value)
Copies the specifiedFloatBufferto thexformfield.
-
xform
public NVGPaint xform(int index, float value)
Sets the specified value at the specified index of thexformfield.
-
extent
public NVGPaint extent(java.nio.FloatBuffer value)
Copies the specifiedFloatBufferto theextentfield.
-
extent
public NVGPaint extent(int index, float value)
Sets the specified value at the specified index of theextentfield.
-
radius
public NVGPaint radius(float value)
Sets the specified value to theradiusfield.
-
feather
public NVGPaint feather(float value)
Sets the specified value to thefeatherfield.
-
innerColor
public NVGPaint innerColor(NVGColor value)
Copies the specifiedNVGColorto theinnerColorfield.
-
outerColor
public NVGPaint outerColor(NVGColor value)
Copies the specifiedNVGColorto theouterColorfield.
-
image
public NVGPaint image(int value)
Sets the specified value to theimagefield.
-
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()
-
calloc
public static NVGPaint calloc()
-
create
public static NVGPaint create()
Returns a newNVGPaintinstance allocated withBufferUtils.
-
create
public static NVGPaint create(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
-
mallocStack
public static NVGPaint mallocStack()
Returns a newNVGPaintinstance allocated on the thread-localMemoryStack.
-
callocStack
public static NVGPaint callocStack()
Returns a newNVGPaintinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static NVGPaint mallocStack(MemoryStack stack)
Returns a newNVGPaintinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static NVGPaint callocStack(MemoryStack stack)
Returns a newNVGPaintinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static NVGPaint.Buffer mallocStack(int capacity)
Returns a newNVGPaint.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static NVGPaint.Buffer callocStack(int capacity)
Returns a newNVGPaint.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static NVGPaint.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newNVGPaint.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static NVGPaint.Buffer callocStack(int capacity, 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
-
-