Top Description Inners Fields Constructors Methods
org.lwjgl.nanovg

public Class NSVGShape

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

Layout


struct NSVGshape {
    char id[64];
    NSVGpaint fill;
    NSVGpaint stroke;
    float opacity;
    float strokeWidth;
    float strokeDashOffset;
    float strokeDashArray[8];
    char strokeDashCount;
    char strokeLineJoin;
    char strokeLineCap;
    float miterLimit;
    char fillRule;
    unsigned char flags;
    float bounds[4];
    char fillGradient[64];
    char strokeGradient[64];
    float xform[6];
    NSVGpath * paths;
    NSVGshape * next;
}

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
NSVGShape.Buffer

An array of NSVGShape 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
FILL

The struct member offsets.

public static final int
FILLGRADIENT

The struct member offsets.

public static final int
FILLRULE

The struct member offsets.

public static final int
FLAGS

The struct member offsets.

public static final int
ID

The struct member offsets.

public static final int
MITERLIMIT

The struct member offsets.

public static final int
NEXT

The struct member offsets.

public static final int
OPACITY

The struct member offsets.

public static final int
PATHS

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

public static final int
STROKE

The struct member offsets.

public static final int
STROKEDASHARRAY

The struct member offsets.

public static final int
STROKEDASHCOUNT

The struct member offsets.

public static final int
STROKEDASHOFFSET

The struct member offsets.

public static final int
STROKEGRADIENT

The struct member offsets.

public static final int
STROKELINECAP

The struct member offsets.

public static final int
STROKELINEJOIN

The struct member offsets.

public static final int
STROKEWIDTH

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
NSVGShape(long address, ByteBuffer container)

public
NSVGShape(ByteBuffer container)

Creates a NSVGShape 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]

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

Returns a new NSVGShape instance for the specified memory address.

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

Create a NSVGShape.Buffer instance at the specified memory.

public static NSVGShape
createSafe(long address)

Like create, but returns null if address is NULL.

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

Like create, but returns null if address is NULL.

public NSVGPaint
fill()

fill paint

public ByteBuffer
fillGradient()

optional 'id' of fill gradient

public String
fillGradientString()

optional 'id' of fill gradient

public byte
fillRule()

fill rule, see NSVGfillRule

public byte
flags()

logical or of NSVG_FLAGS_* flags

public ByteBuffer
id()

optional 'id' attr of the shape or its group

public String
idString()

optional 'id' attr of the shape or its group

public float
miterLimit()

miter limit

public static FloatBuffer
nbounds(long struct)

Unsafe version of bounds.

public static float
nbounds(long struct, int index)

Unsafe version of bounds.

public NSVGShape
next()

pointer to next shape, or NULL if last element

public static NSVGPaint
nfill(long struct)

Unsafe version of fill.

public static ByteBuffer
nfillGradient(long struct)

Unsafe version of fillGradient.

public static String
nfillGradientString(long struct)

Unsafe version of fillGradientString.

public static byte
nfillRule(long struct)

Unsafe version of fillRule.

public static byte
nflags(long struct)

Unsafe version of flags.

public static ByteBuffer
nid(long struct)

Unsafe version of id.

public static String
nidString(long struct)

Unsafe version of idString.

public static float
nmiterLimit(long struct)

Unsafe version of miterLimit.

public static NSVGShape
nnext(long struct)

Unsafe version of next.

public static float
nopacity(long struct)

Unsafe version of opacity.

public static NSVGPath
npaths(long struct)

Unsafe version of paths.

public static NSVGPaint
nstroke(long struct)

Unsafe version of stroke.

public static FloatBuffer
nstrokeDashArray(long struct)

Unsafe version of strokeDashArray.

public static float
nstrokeDashArray(long struct, int index)

Unsafe version of strokeDashArray.

public static byte
nstrokeDashCount(long struct)

Unsafe version of strokeDashCount.

public static float
nstrokeDashOffset(long struct)

Unsafe version of strokeDashOffset.

public static ByteBuffer
nstrokeGradient(long struct)

Unsafe version of strokeGradient.

public static String
nstrokeGradientString(long struct)

Unsafe version of strokeGradientString.

public static byte
nstrokeLineCap(long struct)

Unsafe version of strokeLineCap.

public static byte
nstrokeLineJoin(long struct)

Unsafe version of strokeLineJoin.

public static float
nstrokeWidth(long struct)

Unsafe version of strokeWidth.

public static FloatBuffer
nxform(long struct)

Unsafe version of xform.

public static float
nxform(long struct, int index)

Unsafe version of xform.

public float
opacity()

opacity of the shape

public NSVGPath
paths()

linked list of paths in the image

public int
sizeof()

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

Returns sizeof(struct).
public NSVGPaint
stroke()

stroke paint

public FloatBuffer
strokeDashArray()

stroke dash array (scaled)

public float
strokeDashArray(int index)

stroke dash array (scaled)

public byte
strokeDashCount()

number of dash values in dash array

public float
strokeDashOffset()

stroke dash offset (scaled)

public ByteBuffer
strokeGradient()

optional 'id' of stroke gradient

public String
strokeGradientString()

optional 'id' of stroke gradient

public byte
strokeLineCap()

stroke cap type

public byte
strokeLineJoin()

stroke join type

public float
strokeWidth()

stroke width (scaled)

public FloatBuffer
xform()

root transformation for fill/stroke gradient

public float
xform(int index)

root transformation for fill/stroke gradient

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.

FILLback to summary
public static final int FILL

The struct member offsets.

FILLGRADIENTback to summary
public static final int FILLGRADIENT

The struct member offsets.

FILLRULEback to summary
public static final int FILLRULE

The struct member offsets.

FLAGSback to summary
public static final int FLAGS

The struct member offsets.

IDback to summary
public static final int ID

The struct member offsets.

MITERLIMITback to summary
public static final int MITERLIMIT

The struct member offsets.

NEXTback to summary
public static final int NEXT

The struct member offsets.

OPACITYback to summary
public static final int OPACITY

The struct member offsets.

PATHSback to summary
public static final int PATHS

The struct member offsets.

SIZEOFback to summary
public static final int SIZEOF

The struct size in bytes.

STROKEback to summary
public static final int STROKE

The struct member offsets.

STROKEDASHARRAYback to summary
public static final int STROKEDASHARRAY

The struct member offsets.

STROKEDASHCOUNTback to summary
public static final int STROKEDASHCOUNT

The struct member offsets.

STROKEDASHOFFSETback to summary
public static final int STROKEDASHOFFSET

The struct member offsets.

STROKEGRADIENTback to summary
public static final int STROKEGRADIENT

The struct member offsets.

STROKELINECAPback to summary
public static final int STROKELINECAP

The struct member offsets.

STROKELINEJOINback to summary
public static final int STROKELINEJOIN

The struct member offsets.

STROKEWIDTHback to summary
public static final int STROKEWIDTH

The struct member offsets.

XFORMback to summary
public static final int XFORM

The struct member offsets.

Constructor Detail

NSVGShapeback to summary
protected NSVGShape(long address, ByteBuffer container)
NSVGShapeback to summary
public NSVGShape(ByteBuffer container)

Creates a NSVGShape 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]

createback to summary
protected NSVGShape 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 NSVGShape create(long address)

Returns a new NSVGShape instance for the specified memory address.

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

Create a NSVGShape.Buffer instance at the specified memory.

Parameters
address:long

the memory address

capacity:int

the buffer capacity

createSafeback to summary
public static NSVGShape createSafe(long address)

Like create, but returns null if address is NULL.

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

Like create, but returns null if address is NULL.

Annotations
@Nullable
fillback to summary
public NSVGPaint fill()

fill paint

Annotations
@NativeType:NSVGpaint
fillGradientback to summary
public ByteBuffer fillGradient()

optional 'id' of fill gradient

Annotations
@NativeType:char[64]
fillGradientStringback to summary
public String fillGradientString()

optional 'id' of fill gradient

Annotations
@NativeType:char[64]
fillRuleback to summary
public byte fillRule()

fill rule, see NSVGfillRule

Annotations
@NativeType:char
flagsback to summary
public byte flags()

logical or of NSVG_FLAGS_* flags

Annotations
@NativeType:unsigned char
idback to summary
public ByteBuffer id()

optional 'id' attr of the shape or its group

Annotations
@NativeType:char[64]
idStringback to summary
public String idString()

optional 'id' attr of the shape or its group

Annotations
@NativeType:char[64]
miterLimitback to summary
public float miterLimit()

miter limit

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.

nextback to summary
public NSVGShape next()

pointer to next shape, or NULL if last element

Annotations
@NativeType:NSVGshape *
nfillback to summary
public static NSVGPaint nfill(long struct)

Unsafe version of fill.

nfillGradientback to summary
public static ByteBuffer nfillGradient(long struct)

Unsafe version of fillGradient.

nfillGradientStringback to summary
public static String nfillGradientString(long struct)

Unsafe version of fillGradientString.

nfillRuleback to summary
public static byte nfillRule(long struct)

Unsafe version of fillRule.

nflagsback to summary
public static byte nflags(long struct)

Unsafe version of flags.

nidback to summary
public static ByteBuffer nid(long struct)

Unsafe version of id.

nidStringback to summary
public static String nidString(long struct)

Unsafe version of idString.

nmiterLimitback to summary
public static float nmiterLimit(long struct)

Unsafe version of miterLimit.

nnextback to summary
public static NSVGShape nnext(long struct)

Unsafe version of next.

nopacityback to summary
public static float nopacity(long struct)

Unsafe version of opacity.

npathsback to summary
public static NSVGPath npaths(long struct)

Unsafe version of paths.

nstrokeback to summary
public static NSVGPaint nstroke(long struct)

Unsafe version of stroke.

nstrokeDashArrayback to summary
public static FloatBuffer nstrokeDashArray(long struct)

Unsafe version of strokeDashArray.

nstrokeDashArrayback to summary
public static float nstrokeDashArray(long struct, int index)

Unsafe version of strokeDashArray.

nstrokeDashCountback to summary
public static byte nstrokeDashCount(long struct)

Unsafe version of strokeDashCount.

nstrokeDashOffsetback to summary
public static float nstrokeDashOffset(long struct)

Unsafe version of strokeDashOffset.

nstrokeGradientback to summary
public static ByteBuffer nstrokeGradient(long struct)

Unsafe version of strokeGradient.

nstrokeGradientStringback to summary
public static String nstrokeGradientString(long struct)

Unsafe version of strokeGradientString.

nstrokeLineCapback to summary
public static byte nstrokeLineCap(long struct)

Unsafe version of strokeLineCap.

nstrokeLineJoinback to summary
public static byte nstrokeLineJoin(long struct)

Unsafe version of strokeLineJoin.

nstrokeWidthback to summary
public static float nstrokeWidth(long struct)

Unsafe version of strokeWidth.

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.

opacityback to summary
public float opacity()

opacity of the shape

pathsback to summary
public NSVGPath paths()

linked list of paths in the image

Annotations
@NativeType:NSVGpath *
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
strokeback to summary
public NSVGPaint stroke()

stroke paint

Annotations
@NativeType:NSVGpaint
strokeDashArrayback to summary
public FloatBuffer strokeDashArray()

stroke dash array (scaled)

Annotations
@NativeType:float[8]
strokeDashArrayback to summary
public float strokeDashArray(int index)

stroke dash array (scaled)

strokeDashCountback to summary
public byte strokeDashCount()

number of dash values in dash array

Annotations
@NativeType:char
strokeDashOffsetback to summary
public float strokeDashOffset()

stroke dash offset (scaled)

strokeGradientback to summary
public ByteBuffer strokeGradient()

optional 'id' of stroke gradient

Annotations
@NativeType:char[64]
strokeGradientStringback to summary
public String strokeGradientString()

optional 'id' of stroke gradient

Annotations
@NativeType:char[64]
strokeLineCapback to summary
public byte strokeLineCap()

stroke cap type

Annotations
@NativeType:char
strokeLineJoinback to summary
public byte strokeLineJoin()

stroke join type

Annotations
@NativeType:char
strokeWidthback to summary
public float strokeWidth()

stroke width (scaled)

xformback to summary
public FloatBuffer xform()

root transformation for fill/stroke gradient

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

root transformation for fill/stroke gradient

org.lwjgl.nanovg back to summary

public Class NSVGShape.Buffer

extends StructBuffer<NSVGShape, NSVGShape.Buffer>
Class Inheritance

An array of NSVGShape structs.

Field Summary

Modifier and TypeField and Description
private static final NSVGShape

Constructor Summary

AccessConstructor and Description
public
Buffer(ByteBuffer container)

Creates a new NSVGShape.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 NSVGShape#bounds field.
bounds
()

public float

Returns:

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

public NSVGPaint

Returns:

a NSVGPaint view of the NSVGShape#fill field.
fill
()

public ByteBuffer

Returns:

a ByteBuffer view of the NSVGShape#fillGradient field.
fillGradient
()

public String

Returns:

the null-terminated string stored in the NSVGShape#fillGradient field.
fillGradientString
()

public byte

Returns:

the value of the NSVGShape#fillRule field.
fillRule
()

public byte

Returns:

the value of the NSVGShape#flags field.
flags
()

protected NSVGShape
public ByteBuffer

Returns:

a ByteBuffer view of the NSVGShape#id field.
id
()

public String

Returns:

the null-terminated string stored in the NSVGShape#id field.
idString
()

public float

Returns:

the value of the NSVGShape#miterLimit field.
miterLimit
()

public NSVGShape

Returns:

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

public float

Returns:

the value of the NSVGShape#opacity field.
opacity
()

public NSVGPath

Returns:

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

protected NSVGShape.Buffer
public NSVGPaint

Returns:

a NSVGPaint view of the NSVGShape#stroke field.
stroke
()

public FloatBuffer

Returns:

a FloatBuffer view of the NSVGShape#strokeDashArray field.
strokeDashArray
()

public float

Returns:

the value at the specified index of the NSVGShape#strokeDashArray field.
strokeDashArray
(int index)

public byte

Returns:

the value of the NSVGShape#strokeDashCount field.
strokeDashCount
()

public float

Returns:

the value of the NSVGShape#strokeDashOffset field.
strokeDashOffset
()

public ByteBuffer

Returns:

a ByteBuffer view of the NSVGShape#strokeGradient field.
strokeGradient
()

public String

Returns:

the null-terminated string stored in the NSVGShape#strokeGradient field.
strokeGradientString
()

public byte

Returns:

the value of the NSVGShape#strokeLineCap field.
strokeLineCap
()

public byte

Returns:

the value of the NSVGShape#strokeLineJoin field.
strokeLineJoin
()

public float

Returns:

the value of the NSVGShape#strokeWidth field.
strokeWidth
()

public FloatBuffer

Returns:

a FloatBuffer view of the NSVGShape#xform field.
xform
()

public float

Returns:

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

Inherited from org.lwjgl.system.StructBuffer:
applyapplyforEachgetgetgetgetiteratorparallelStreamputputsizeofspliteratorstream

Field Detail

ELEMENT_FACTORYback to summary
private static final NSVGShape ELEMENT_FACTORY

Constructor Detail

Bufferback to summary
public Buffer(ByteBuffer container)

Creates a new NSVGShape.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 NSVGShape#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 NSVGShape#bounds field.

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

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

fillback to summary
public NSVGPaint fill()
Returns:NSVGPaint

a NSVGPaint view of the NSVGShape#fill field.

Annotations
@NativeType:NSVGpaint
fillGradientback to summary
public ByteBuffer fillGradient()
Returns:ByteBuffer

a ByteBuffer view of the NSVGShape#fillGradient field.

Annotations
@NativeType:char[64]
fillGradientStringback to summary
public String fillGradientString()
Returns:String

the null-terminated string stored in the NSVGShape#fillGradient field.

Annotations
@NativeType:char[64]
fillRuleback to summary
public byte fillRule()
Returns:byte

the value of the NSVGShape#fillRule field.

Annotations
@NativeType:char
flagsback to summary
public byte flags()
Returns:byte

the value of the NSVGShape#flags field.

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

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

Annotations
@Override
idback to summary
public ByteBuffer id()
Returns:ByteBuffer

a ByteBuffer view of the NSVGShape#id field.

Annotations
@NativeType:char[64]
idStringback to summary
public String idString()
Returns:String

the null-terminated string stored in the NSVGShape#id field.

Annotations
@NativeType:char[64]
miterLimitback to summary
public float miterLimit()
Returns:float

the value of the NSVGShape#miterLimit field.

nextback to summary
public NSVGShape next()
Returns:NSVGShape

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

Annotations
@NativeType:NSVGshape *
opacityback to summary
public float opacity()
Returns:float

the value of the NSVGShape#opacity field.

pathsback to summary
public NSVGPath paths()
Returns:NSVGPath

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

Annotations
@NativeType:NSVGpath *
selfback to summary
protected NSVGShape.Buffer self()

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

Annotations
@Override
strokeback to summary
public NSVGPaint stroke()
Returns:NSVGPaint

a NSVGPaint view of the NSVGShape#stroke field.

Annotations
@NativeType:NSVGpaint
strokeDashArrayback to summary
public FloatBuffer strokeDashArray()
Returns:FloatBuffer

a FloatBuffer view of the NSVGShape#strokeDashArray field.

Annotations
@NativeType:float[8]
strokeDashArrayback to summary
public float strokeDashArray(int index)
Returns:float

the value at the specified index of the NSVGShape#strokeDashArray field.

strokeDashCountback to summary
public byte strokeDashCount()
Returns:byte

the value of the NSVGShape#strokeDashCount field.

Annotations
@NativeType:char
strokeDashOffsetback to summary
public float strokeDashOffset()
Returns:float

the value of the NSVGShape#strokeDashOffset field.

strokeGradientback to summary
public ByteBuffer strokeGradient()
Returns:ByteBuffer

a ByteBuffer view of the NSVGShape#strokeGradient field.

Annotations
@NativeType:char[64]
strokeGradientStringback to summary
public String strokeGradientString()
Returns:String

the null-terminated string stored in the NSVGShape#strokeGradient field.

Annotations
@NativeType:char[64]
strokeLineCapback to summary
public byte strokeLineCap()
Returns:byte

the value of the NSVGShape#strokeLineCap field.

Annotations
@NativeType:char
strokeLineJoinback to summary
public byte strokeLineJoin()
Returns:byte

the value of the NSVGShape#strokeLineJoin field.

Annotations
@NativeType:char
strokeWidthback to summary
public float strokeWidth()
Returns:float

the value of the NSVGShape#strokeWidth field.

xformback to summary
public FloatBuffer xform()
Returns:FloatBuffer

a FloatBuffer view of the NSVGShape#xform field.

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

the value at the specified index of the NSVGShape#xform field.