Top Description Inners Fields Constructors Methods
org.lwjgl.nanovg

public Class NSVGPath

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

Layout


struct NSVGpath {
    float * pts;
    int npts;
    char closed;
    float bounds[4];
    NSVGpath * next;
}

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
NSVGPath.Buffer

An array of NSVGPath structs.

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
BOUNDS

The struct member offsets.

public static final int
CLOSED

The struct member offsets.

public static final int
NEXT

The struct member offsets.

public static final int
NPTS

The struct member offsets.

public static final int
PTS

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

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

public
NSVGPath(ByteBuffer container)

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

Method Summary

Modifier and TypeMethod and Description
public FloatBuffer
bounds()

tight bounding box of the shape [minx,miny,maxx,maxy]

public float
bounds(int index)

tight bounding box of the shape [minx,miny,maxx,maxy]

public byte
closed()

flag indicating if shapes should be treated as closed

protected NSVGPath
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 NSVGPath
create(long address)

Returns a new NSVGPath instance for the specified memory address.

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

Create a NSVGPath.Buffer instance at the specified memory.

public static NSVGPath
createSafe(long address)

Like create, but returns null if address is NULL.

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

Like create, but returns null if address is NULL.

public static FloatBuffer
nbounds(long struct)

Unsafe version of bounds.

public static float
nbounds(long struct, int index)

Unsafe version of bounds.

public static byte
nclosed(long struct)

Unsafe version of closed.

public NSVGPath
next()

pointer to next path, or NULL if last element

public static NSVGPath
nnext(long struct)

Unsafe version of next.

public static int
nnpts(long struct)

Unsafe version of npts.

public int
npts()

total number of bezier points

public static FloatBuffer
npts(long struct)

Unsafe version of pts.

public FloatBuffer
pts()

cubic bezier points: x0,y0, [cpx1,cpx1,cpx2,cpy2,x1,y1], ...

public int
sizeof()

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

Returns sizeof(struct).
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.

BOUNDSback to summary
public static final int BOUNDS

The struct member offsets.

CLOSEDback to summary
public static final int CLOSED

The struct member offsets.

NEXTback to summary
public static final int NEXT

The struct member offsets.

NPTSback to summary
public static final int NPTS

The struct member offsets.

PTSback to summary
public static final int PTS

The struct member offsets.

SIZEOFback to summary
public static final int SIZEOF

The struct size in bytes.

Constructor Detail

NSVGPathback to summary
protected NSVGPath(long address, ByteBuffer container)
NSVGPathback to summary
public NSVGPath(ByteBuffer container)

Creates a NSVGPath 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

boundsback to summary
public FloatBuffer bounds()

tight bounding box of the shape [minx,miny,maxx,maxy]

Annotations
@NativeType:float[4]
boundsback to summary
public float bounds(int index)

tight bounding box of the shape [minx,miny,maxx,maxy]

closedback to summary
public byte closed()

flag indicating if shapes should be treated as closed

Annotations
@NativeType:char
createback to summary
protected NSVGPath 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 NSVGPath create(long address)

Returns a new NSVGPath instance for the specified memory address.

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

Create a NSVGPath.Buffer instance at the specified memory.

Parameters
address:long

the memory address

capacity:int

the buffer capacity

createSafeback to summary
public static NSVGPath createSafe(long address)

Like create, but returns null if address is NULL.

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

Like create, but returns null if address is NULL.

Annotations
@Nullable
nboundsback to summary
public static FloatBuffer nbounds(long struct)

Unsafe version of bounds.

nboundsback to summary
public static float nbounds(long struct, int index)

Unsafe version of bounds.

nclosedback to summary
public static byte nclosed(long struct)

Unsafe version of closed.

nextback to summary
public NSVGPath next()

pointer to next path, or NULL if last element

Annotations
@NativeType:NSVGpath *
nnextback to summary
public static NSVGPath nnext(long struct)

Unsafe version of next.

nnptsback to summary
public static int nnpts(long struct)

Unsafe version of npts.

nptsback to summary
public int npts()

total number of bezier points

nptsback to summary
public static FloatBuffer npts(long struct)

Unsafe version of pts.

ptsback to summary
public FloatBuffer pts()

cubic bezier points: x0,y0, [cpx1,cpx1,cpx2,cpy2,x1,y1], ...

Annotations
@NativeType:float *
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
org.lwjgl.nanovg back to summary

public Class NSVGPath.Buffer

extends StructBuffer<NSVGPath, NSVGPath.Buffer>
Class Inheritance

An array of NSVGPath structs.

Field Summary

Modifier and TypeField and Description
private static final NSVGPath

Constructor Summary

AccessConstructor and Description
public
Buffer(ByteBuffer container)

Creates a new NSVGPath.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 FloatBuffer

Returns:

a FloatBuffer view of the NSVGPath#bounds field.
bounds
()

public float

Returns:

the value at the specified index of the NSVGPath#bounds field.
bounds
(int index)

public byte

Returns:

the value of the NSVGPath#closed field.
closed
()

protected NSVGPath
public NSVGPath

Returns:

a NSVGPath view of the struct pointed to by the NSVGPath#next field.
next
()

public int

Returns:

the value of the NSVGPath#npts field.
npts
()

public FloatBuffer

Returns:

a FloatBuffer view of the data pointed to by the NSVGPath#pts field.
pts
()

protected NSVGPath.Buffer
Inherited from org.lwjgl.system.StructBuffer:
applyapplyforEachgetgetgetgetiteratorparallelStreamputputsizeofspliteratorstream

Field Detail

ELEMENT_FACTORYback to summary
private static final NSVGPath ELEMENT_FACTORY

Constructor Detail

Bufferback to summary
public Buffer(ByteBuffer container)

Creates a new NSVGPath.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 NSVGPath#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

boundsback to summary
public FloatBuffer bounds()
Returns:FloatBuffer

a FloatBuffer view of the NSVGPath#bounds field.

Annotations
@NativeType:float[4]
boundsback to summary
public float bounds(int index)
Returns:float

the value at the specified index of the NSVGPath#bounds field.

closedback to summary
public byte closed()
Returns:byte

the value of the NSVGPath#closed field.

Annotations
@NativeType:char
getElementFactoryback to summary
protected NSVGPath getElementFactory()

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

Annotations
@Override
nextback to summary
public NSVGPath next()
Returns:NSVGPath

a NSVGPath view of the struct pointed to by the NSVGPath#next field.

Annotations
@NativeType:NSVGpath *
nptsback to summary
public int npts()
Returns:int

the value of the NSVGPath#npts field.

ptsback to summary
public FloatBuffer pts()
Returns:FloatBuffer

a FloatBuffer view of the data pointed to by the NSVGPath#pts field.

Annotations
@NativeType:float *
selfback to summary
protected NSVGPath.Buffer self()

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

Annotations
@Override