Top Description Inners Fields Constructors Methods
org.lwjgl.nanovg

public Class NSVGGradient

extends Struct<NSVGGradient>
Class Inheritance
Annotations
@NativeType:struct NSVGgradient
Imports
javax.annotation.*, java.nio.*, org.lwjgl.system.*

Layout


struct NSVGgradient {
    float xform[6];
    char spread;
    float fx;
    float fy;
    int nstops;
    NSVGgradientStop pstops[1];
}

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
NSVGGradient.Buffer

An array of NSVGGradient structs.

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
FX

The struct member offsets.

public static final int
FY

The struct member offsets.

public static final int
NSTOPS

The struct member offsets.

public static final int
PSTOPS

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

public static final int
SPREAD

The struct member offsets.

public static final int
XFORM

The struct member offsets.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

AccessConstructor and Description
protected
NSVGGradient(long address, ByteBuffer container)

public
NSVGGradient(ByteBuffer container)

Creates a NSVGGradient instance at the current position of the specified ByteBuffer container.

Method Summary

Modifier and TypeMethod and Description
protected NSVGGradient
create(long
the struct memory address
address
,
ByteBuffer
an optional container buffer, to be referenced strongly by the struct instance.
container
)

Implements abstract org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.
public static NSVGGradient
create(long address)

Returns a new NSVGGradient instance for the specified memory address.

public static NSVGGradient.Buffer
create(long
the memory address
address
,
int
the buffer capacity
capacity
)

Create a NSVGGradient.Buffer instance at the specified memory.

public static NSVGGradient
createSafe(long address)

Like create, but returns null if address is NULL.

public static NSVGGradient.Buffer
createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

public float

Returns:

the value of the fx field.
fx
()

public float

Returns:

the value of the fy field.
fy
()

public static float
nfx(long struct)

Unsafe version of fx.

public static float
nfy(long struct)

Unsafe version of fy.

public static int
nnstops(long struct)

Unsafe version of nstops.

public static NSVGGradientStop.Buffer
npstops(long struct)

Unsafe version of pstops.

public static NSVGGradientStop
npstops(long struct, int index)

Unsafe version of pstops.

public static byte
nspread(long struct)

Unsafe version of spread.

public int

Returns:

the value of the nstops field.
nstops
()

public static FloatBuffer
nxform(long struct)

Unsafe version of xform.

public static float
nxform(long struct, int index)

Unsafe version of xform.

public NSVGGradientStop.Buffer

Returns:

a NSVGGradientStop.Buffer view of the pstops field.
pstops
()

public NSVGGradientStop

Returns:

a NSVGGradientStop view of the struct at the specified index of the pstops field.
pstops
(int index)

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
public byte

Returns:

the value of the spread field.
spread
()

public FloatBuffer

Returns:

a FloatBuffer view of the xform field.
xform
()

public float

Returns:

the value at the specified index of the xform field.
xform
(int index)

Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate

Field Detail

ALIGNOFback to summary
public static final int ALIGNOF

The struct alignment in bytes.

FXback to summary
public static final int FX

The struct member offsets.

FYback to summary
public static final int FY

The struct member offsets.

NSTOPSback to summary
public static final int NSTOPS

The struct member offsets.

PSTOPSback to summary
public static final int PSTOPS

The struct member offsets.

SIZEOFback to summary
public static final int SIZEOF

The struct size in bytes.

SPREADback to summary
public static final int SPREAD

The struct member offsets.

XFORMback to summary
public static final int XFORM

The struct member offsets.

Constructor Detail

NSVGGradientback to summary
protected NSVGGradient(long address, ByteBuffer container)
NSVGGradientback to summary
public NSVGGradient(ByteBuffer container)

Creates a NSVGGradient instance at the current position of the specified ByteBuffer 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

createback to summary
protected NSVGGradient create(long address, ByteBuffer container)

Implements abstract org.lwjgl.system.Struct.create.

Doc from org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.

Effectively, every Struct instance is a factory for more instances of the same type. This is used by StructBuffer.

Parameters
address:long

the struct memory address

container:ByteBuffer

an optional container buffer, to be referenced strongly by the struct instance.

Annotations
@Override
createback to summary
public static NSVGGradient create(long address)

Returns a new NSVGGradient instance for the specified memory address.

createback to summary
public static NSVGGradient.Buffer create(long address, int capacity)

Create a NSVGGradient.Buffer instance at the specified memory.

Parameters
address:long

the memory address

capacity:int

the buffer capacity

createSafeback to summary
public static NSVGGradient createSafe(long address)

Like create, but returns null if address is NULL.

Annotations
@Nullable
createSafeback to summary
public static NSVGGradient.Buffer createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

Annotations
@Nullable
fxback to summary
public float fx()
Returns:float

the value of the fx field.

fyback to summary
public float fy()
Returns:float

the value of the fy field.

nfxback to summary
public static float nfx(long struct)

Unsafe version of fx.

nfyback to summary
public static float nfy(long struct)

Unsafe version of fy.

nnstopsback to summary
public static int nnstops(long struct)

Unsafe version of nstops.

npstopsback to summary
public static NSVGGradientStop.Buffer npstops(long struct)

Unsafe version of pstops.

npstopsback to summary
public static NSVGGradientStop npstops(long struct, int index)

Unsafe version of pstops.

nspreadback to summary
public static byte nspread(long struct)

Unsafe version of spread.

nstopsback to summary
public int nstops()
Returns:int

the value of the nstops field.

nxformback to summary
public static FloatBuffer nxform(long struct)

Unsafe version of xform.

nxformback to summary
public static float nxform(long struct, int index)

Unsafe version of xform.

pstopsback to summary
public NSVGGradientStop.Buffer pstops()
Returns:NSVGGradientStop.Buffer

a NSVGGradientStop.Buffer view of the pstops field.

Annotations
@NativeType:NSVGgradientStop[1]
pstopsback to summary
public NSVGGradientStop pstops(int index)
Returns:NSVGGradientStop

a NSVGGradientStop view of the struct at the specified index of the pstops field.

Annotations
@NativeType:NSVGgradientStop
sizeofback to summary
public int sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Doc from org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).

Annotations
@Override
spreadback to summary
public byte spread()
Returns:byte

the value of the spread field.

Annotations
@NativeType:char
xformback to summary
public FloatBuffer xform()
Returns:FloatBuffer

a FloatBuffer view of the xform field.

Annotations
@NativeType:float[6]
xformback to summary
public float xform(int index)
Returns:float

the value at the specified index of the xform field.

org.lwjgl.nanovg back to summary

public Class NSVGGradient.Buffer

extends StructBuffer<NSVGGradient, NSVGGradient.Buffer>
Class Inheritance

An array of NSVGGradient structs.

Field Summary

Modifier and TypeField and Description
private static final NSVGGradient

Constructor Summary

AccessConstructor and Description
public
Buffer(ByteBuffer container)

Creates a new NSVGGradient.Buffer instance backed by the specified container.

public
Buffer(long address, int cap)

pack-priv
Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Summary

Modifier and TypeMethod and Description
public float

Returns:

the value of the fx field.
fx
()

public float

Returns:

the value of the fy field.
fy
()

protected NSVGGradient
public int

Returns:

the value of the nstops field.
nstops
()

public NSVGGradientStop.Buffer

Returns:

a NSVGGradientStop.Buffer view of the pstops field.
pstops
()

public NSVGGradientStop

Returns:

a NSVGGradientStop view of the struct at the specified index of the pstops field.
pstops
(int index)

protected NSVGGradient.Buffer
public byte

Returns:

the value of the spread field.
spread
()

public FloatBuffer

Returns:

a FloatBuffer view of the xform field.
xform
()

public float

Returns:

the value at the specified index of the xform field.
xform
(int index)

Inherited from org.lwjgl.system.StructBuffer:
applyapplyforEachgetgetgetgetiteratorparallelStreamputputsizeofspliteratorstream

Field Detail

ELEMENT_FACTORYback to summary
private static final NSVGGradient ELEMENT_FACTORY

Constructor Detail

Bufferback to summary
public Buffer(ByteBuffer container)

Creates a new NSVGGradient.Buffer instance backed by the specified container.

Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided by NSVGGradient#SIZEOF, and its mark will be undefined.

The created buffer instance holds a strong reference to the container object.

Bufferback to summary
public Buffer(long address, int cap)
Bufferback to summary
pack-priv Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Detail

fxback to summary
public float fx()
Returns:float

the value of the fx field.

fyback to summary
public float fy()
Returns:float

the value of the fy field.

getElementFactoryback to summary
protected NSVGGradient getElementFactory()

Implements abstract org.lwjgl.system.StructBuffer.getElementFactory.

Annotations
@Override
nstopsback to summary
public int nstops()
Returns:int

the value of the nstops field.

pstopsback to summary
public NSVGGradientStop.Buffer pstops()
Returns:NSVGGradientStop.Buffer

a NSVGGradientStop.Buffer view of the pstops field.

Annotations
@NativeType:NSVGgradientStop[1]
pstopsback to summary
public NSVGGradientStop pstops(int index)
Returns:NSVGGradientStop

a NSVGGradientStop view of the struct at the specified index of the pstops field.

Annotations
@NativeType:NSVGgradientStop
selfback to summary
protected NSVGGradient.Buffer self()

Implements abstract org.lwjgl.system.CustomBuffer.self.

Annotations
@Override
spreadback to summary
public byte spread()
Returns:byte

the value of the spread field.

Annotations
@NativeType:char
xformback to summary
public FloatBuffer xform()
Returns:FloatBuffer

a FloatBuffer view of the xform field.

Annotations
@NativeType:float[6]
xformback to summary
public float xform(int index)
Returns:float

the value at the specified index of the xform field.