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.Struct
Layout
struct NSVGgradient { float xform[6]; char spread; float fx; float fy; int nstops;
NSVGgradientStop
pstops[1]; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NSVGGradient.Buffer
An array ofNSVGGradient
structs.
-
Constructor Summary
Constructors Constructor Description NSVGGradient(java.nio.ByteBuffer container)
Creates aNSVGGradient
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NSVGGradient
create(long address)
Returns a newNSVGGradient
instance for the specified memory address.static NSVGGradient.Buffer
create(long address, int capacity)
Create aNSVGGradient.Buffer
instance at the specified memory.static NSVGGradient
createSafe(long address)
static NSVGGradient.Buffer
createSafe(long address, int capacity)
float
fx()
Returns the value of thefx
field.float
fy()
Returns the value of thefy
field.static float
nfx(long struct)
Unsafe version offx()
.static float
nfy(long struct)
Unsafe version offy()
.static int
nnstops(long struct)
Unsafe version ofnstops()
.static NSVGGradientStop.Buffer
npstops(long struct)
Unsafe version ofpstops()
.static NSVGGradientStop
npstops(long struct, int index)
Unsafe version ofpstops
.static byte
nspread(long struct)
Unsafe version ofspread()
.int
nstops()
Returns the value of thenstops
field.static java.nio.FloatBuffer
nxform(long struct)
Unsafe version ofxform()
.static float
nxform(long struct, int index)
Unsafe version ofxform
.NSVGGradientStop.Buffer
pstops()
Returns aNSVGGradientStop
.Buffer view of thepstops
field.NSVGGradientStop
pstops(int index)
Returns aNSVGGradientStop
view of the struct at the specified index of thepstops
field.int
sizeof()
byte
spread()
Returns the value of thespread
field.java.nio.FloatBuffer
xform()
Returns aFloatBuffer
view of thexform
field.float
xform(int index)
Returns the value at the specified index of thexform
field.
-
-
-
Constructor Detail
-
NSVGGradient
public NSVGGradient(java.nio.ByteBuffer container)
Creates aNSVGGradient
instance at the current position of the specifiedByteBuffer
container. 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:
sizeof
in classorg.lwjgl.system.Struct
-
xform
public java.nio.FloatBuffer xform()
Returns aFloatBuffer
view of thexform
field.
-
xform
public float xform(int index)
Returns the value at the specified index of thexform
field.
-
spread
public byte spread()
Returns the value of thespread
field.
-
fx
public float fx()
Returns the value of thefx
field.
-
fy
public float fy()
Returns the value of thefy
field.
-
nstops
public int nstops()
Returns the value of thenstops
field.
-
pstops
public NSVGGradientStop.Buffer pstops()
Returns aNSVGGradientStop
.Buffer view of thepstops
field.
-
pstops
public NSVGGradientStop pstops(int index)
Returns aNSVGGradientStop
view of the struct at the specified index of thepstops
field.
-
create
public static NSVGGradient create(long address)
Returns a newNSVGGradient
instance 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.Buffer
instance 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
.
-
-