Package org.lwjgl.nanovg
Class NSVGGradient
- All Implemented Interfaces:
Pointer
struct NSVGgradient {
float xform[6];
char spread;
float fx;
float fy;
int nstops;
{@link NSVGGradientStop NSVGgradientStop} pstops[1];
}
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct size in bytes.static final int
The struct member offsets.static final int
The struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorsConstructorDescriptionNSVGGradient
(ByteBuffer container) Creates aNSVGGradient
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic 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 @Nullable NSVGGradient
createSafe
(long address) static @Nullable NSVGGradient.Buffer
createSafe
(long address, int capacity) float
fx()
float
fy()
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()
static FloatBuffer
nxform
(long struct) Unsafe version ofxform()
.static float
nxform
(long struct, int index) Unsafe version ofxform
.pstops()
pstops
(int index) int
sizeof()
Returnssizeof(struct)
.byte
spread()
xform()
float
xform
(int index) Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
XFORM
public static final int XFORMThe struct member offsets. -
SPREAD
public static final int SPREADThe struct member offsets. -
FX
public static final int FXThe struct member offsets. -
FY
public static final int FYThe struct member offsets. -
NSTOPS
public static final int NSTOPSThe struct member offsets. -
PSTOPS
public static final int PSTOPSThe struct member offsets.
-
-
Constructor Details
-
NSVGGradient
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 Details
-
sizeof
public int sizeof()Description copied from class:Struct
Returnssizeof(struct)
.- Specified by:
sizeof
in classStruct<NSVGGradient>
-
xform
- Returns:
- a
FloatBuffer
view of thexform
field.
-
xform
public float xform(int index) - Returns:
- the value at the specified index of the
xform
field.
-
spread
public byte spread()- Returns:
- the value of the
spread
field.
-
fx
public float fx()- Returns:
- the value of the
fx
field.
-
fy
public float fy()- Returns:
- the value of the
fy
field.
-
nstops
public int nstops()- Returns:
- the value of the
nstops
field.
-
pstops
- Returns:
- a
NSVGGradientStop
.Buffer view of thepstops
field.
-
pstops
- Returns:
- a
NSVGGradientStop
view of the struct at the specified index of thepstops
field.
-
create
Returns a newNSVGGradient
instance for the specified memory address. -
createSafe
-
create
Create aNSVGGradient.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
nxform
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
Unsafe version ofpstops()
. -
npstops
Unsafe version ofpstops
.
-