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.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.static final intThe 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 aNSVGGradientinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic 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 @Nullable NSVGGradientcreateSafe(long address) static @Nullable 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 FloatBuffernxform(long struct) Unsafe version ofxform().static floatnxform(long struct, int index) Unsafe version ofxform.pstops()pstops(int index) intsizeof()Returnssizeof(struct).bytespread()xform()floatxform(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 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 Details
-
sizeof
public int sizeof()Description copied from class:StructReturnssizeof(struct).- Specified by:
sizeofin classStruct<NSVGGradient>
-
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
- Returns:
- a
NSVGGradientStop.Buffer view of thepstopsfield.
-
pstops
- Returns:
- a
NSVGGradientStopview of the struct at the specified index of thepstopsfield.
-
create
Returns a newNSVGGradientinstance for the specified memory address. -
createSafe
-
create
Create aNSVGGradient.Bufferinstance 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.
-