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()floatfy()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()static java.nio.FloatBuffernxform(long struct)Unsafe version ofxform().static floatnxform(long struct, int index)Unsafe version ofxform.NSVGGradientStop.Bufferpstops()NSVGGradientStoppstops(int index)intsizeof()bytespread()java.nio.FloatBufferxform()floatxform(int index)
-
-
-
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:
- a
FloatBufferview of thexformfield.
-
xform
public float xform(int index)
- Returns:
- the value at the specified index of the
xformfield.
-
spread
public byte spread()
- Returns:
- the value of the
spreadfield.
-
fx
public float fx()
- Returns:
- the value of the
fxfield.
-
fy
public float fy()
- Returns:
- the value of the
fyfield.
-
nstops
public int nstops()
- Returns:
- the value of the
nstopsfield.
-
pstops
public NSVGGradientStop.Buffer pstops()
- Returns:
- a
NSVGGradientStop.Buffer view of thepstopsfield.
-
pstops
public NSVGGradientStop pstops(int index)
- Returns:
- a
NSVGGradientStopview 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.
-
-