Package org.lwjgl.nanovg
Class NSVGGradient
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.nanovg.NSVGGradient
-
- All Implemented Interfaces:
org.lwjgl.system.Pointer
public class NSVGGradient extends org.lwjgl.system.StructLayout
struct NSVGgradient { float xform[6]; char spread; float fx; float fy; int nstops;NSVGgradientStoppstops[1]; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNSVGGradient.BufferAn array ofNSVGGradientstructs.
-
Constructor Summary
Constructors Constructor Description NSVGGradient(java.nio.ByteBuffer container)Creates aNSVGGradientinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NSVGGradientcreate(long address)Returns a newNSVGGradientinstance for the specified memory address.static NSVGGradient.Buffercreate(long address, int capacity)Create aNSVGGradient.Bufferinstance at the specified memory.static NSVGGradientcreateSafe(long address)static NSVGGradient.BuffercreateSafe(long address, int capacity)floatfx()Returns the value of thefxfield.floatfy()Returns the value of thefyfield.static floatnfx(long struct)Unsafe version offx().static floatnfy(long struct)Unsafe version offy().static intnnstops(long struct)Unsafe version ofnstops().static NSVGGradientStop.Buffernpstops(long struct)Unsafe version ofpstops().static NSVGGradientStopnpstops(long struct, int index)Unsafe version ofpstops.static bytenspread(long struct)Unsafe version ofspread().intnstops()Returns the value of thenstopsfield.static java.nio.FloatBuffernxform(long struct)Unsafe version ofxform().static floatnxform(long struct, int index)Unsafe version ofxform.NSVGGradientStop.Bufferpstops()Returns aNSVGGradientStop.Buffer view of thepstopsfield.NSVGGradientStoppstops(int index)Returns aNSVGGradientStopview of the struct at the specified index of thepstopsfield.intsizeof()bytespread()Returns the value of thespreadfield.java.nio.FloatBufferxform()Returns aFloatBufferview of thexformfield.floatxform(int index)Returns the value at the specified index of thexformfield.
-
-
-
Constructor Detail
-
NSVGGradient
public NSVGGradient(java.nio.ByteBuffer container)
Creates aNSVGGradientinstance 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()
Returns aFloatBufferview of thexformfield.
-
xform
public float xform(int index)
Returns the value at the specified index of thexformfield.
-
spread
public byte spread()
Returns the value of thespreadfield.
-
fx
public float fx()
Returns the value of thefxfield.
-
fy
public float fy()
Returns the value of thefyfield.
-
nstops
public int nstops()
Returns the value of thenstopsfield.
-
pstops
public NSVGGradientStop.Buffer pstops()
Returns aNSVGGradientStop.Buffer view of thepstopsfield.
-
pstops
public NSVGGradientStop pstops(int index)
Returns aNSVGGradientStopview of the struct at the specified index of thepstopsfield.
-
create
public static NSVGGradient create(long address)
Returns a newNSVGGradientinstance for the specified memory address.
-
createSafe
@Nullable public static NSVGGradient createSafe(long address)
-
create
public static NSVGGradient.Buffer create(long address, int capacity)
Create aNSVGGradient.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static NSVGGradient.Buffer createSafe(long address, int 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.
-
nspread
public static byte nspread(long struct)
Unsafe version ofspread().
-
nfx
public static float nfx(long struct)
Unsafe version offx().
-
nfy
public static float nfy(long struct)
Unsafe version offy().
-
nnstops
public static int nnstops(long struct)
Unsafe version ofnstops().
-
npstops
public static NSVGGradientStop.Buffer npstops(long struct)
Unsafe version ofpstops().
-
npstops
public static NSVGGradientStop npstops(long struct, int index)
Unsafe version ofpstops.
-
-