Package org.lwjgl.nanovg
Class NSVGShape
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.nanovg.NSVGShape
-
- All Implemented Interfaces:
org.lwjgl.system.Pointer
public class NSVGShape extends org.lwjgl.system.Struct
Member documentation
id[64]
– optional 'id' attr of the shape or its groupfill
– fill paintstroke
– stroke paintopacity
– opacity of the shapestrokeWidth
– stroke width (scaled)strokeDashOffset
– stroke dash offset (scaled)strokeDashArray[8]
– stroke dash array (scaled)strokeDashCount
– number of dash values in dash arraystrokeLineJoin
– stroke join typestrokeLineCap
– stroke cap typemiterLimit
– miter limitfillRule
– fill rule, see NSVGfillRuleflags
– logical or of NSVG_FLAGS_* flagsbounds[4]
– tight bounding box of the shape[minx,miny,maxx,maxy]
paths
– linked list of paths in the imagenext
– pointer to next shape, orNULL
if last element
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];NSVGpath
* paths;NSVGshape
* next; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NSVGShape.Buffer
An array ofNSVGShape
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
BOUNDS
FILL
FILLRULE
FLAGS
ID
MITERLIMIT
NEXT
OPACITY
PATHSThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
STROKE
STROKEDASHARRAY
STROKEDASHCOUNT
STROKEDASHOFFSET
STROKELINECAP
STROKELINEJOIN
STROKEWIDTHThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description NSVGShape(java.nio.ByteBuffer container)
Creates aNSVGShape
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.FloatBuffer
bounds()
Returns aFloatBuffer
view of thebounds
field.float
bounds(int index)
Returns the value at the specified index of thebounds
field.static NSVGShape
create(long address)
Returns a newNSVGShape
instance for the specified memory address.static NSVGShape.Buffer
create(long address, int capacity)
Create aNSVGShape.Buffer
instance at the specified memory.static NSVGShape
createSafe(long address)
static NSVGShape.Buffer
createSafe(long address, int capacity)
NSVGPaint
fill()
Returns aNSVGPaint
view of thefill
field.byte
fillRule()
Returns the value of thefillRule
field.byte
flags()
Returns the value of theflags
field.java.nio.ByteBuffer
id()
Returns aByteBuffer
view of theid
field.java.lang.String
idString()
Decodes the null-terminated string stored in theid
field.float
miterLimit()
Returns the value of themiterLimit
field.static java.nio.FloatBuffer
nbounds(long struct)
Unsafe version ofbounds()
.static float
nbounds(long struct, int index)
Unsafe version ofbounds
.NSVGShape
next()
Returns aNSVGShape
view of the struct pointed to by thenext
field.static NSVGPaint
nfill(long struct)
Unsafe version offill()
.static byte
nfillRule(long struct)
Unsafe version offillRule()
.static byte
nflags(long struct)
Unsafe version offlags()
.static java.nio.ByteBuffer
nid(long struct)
Unsafe version ofid()
.static java.lang.String
nidString(long struct)
Unsafe version ofidString()
.static float
nmiterLimit(long struct)
Unsafe version ofmiterLimit()
.static NSVGShape
nnext(long struct)
Unsafe version ofnext()
.static float
nopacity(long struct)
Unsafe version ofopacity()
.static NSVGPath
npaths(long struct)
Unsafe version ofpaths()
.static NSVGPaint
nstroke(long struct)
Unsafe version ofstroke()
.static java.nio.FloatBuffer
nstrokeDashArray(long struct)
Unsafe version ofstrokeDashArray()
.static float
nstrokeDashArray(long struct, int index)
Unsafe version ofstrokeDashArray
.static byte
nstrokeDashCount(long struct)
Unsafe version ofstrokeDashCount()
.static float
nstrokeDashOffset(long struct)
Unsafe version ofstrokeDashOffset()
.static byte
nstrokeLineCap(long struct)
Unsafe version ofstrokeLineCap()
.static byte
nstrokeLineJoin(long struct)
Unsafe version ofstrokeLineJoin()
.static float
nstrokeWidth(long struct)
Unsafe version ofstrokeWidth()
.float
opacity()
Returns the value of theopacity
field.NSVGPath
paths()
Returns aNSVGPath
view of the struct pointed to by thepaths
field.int
sizeof()
NSVGPaint
stroke()
Returns aNSVGPaint
view of thestroke
field.java.nio.FloatBuffer
strokeDashArray()
Returns aFloatBuffer
view of thestrokeDashArray
field.float
strokeDashArray(int index)
Returns the value at the specified index of thestrokeDashArray
field.byte
strokeDashCount()
Returns the value of thestrokeDashCount
field.float
strokeDashOffset()
Returns the value of thestrokeDashOffset
field.byte
strokeLineCap()
Returns the value of thestrokeLineCap
field.byte
strokeLineJoin()
Returns the value of thestrokeLineJoin
field.float
strokeWidth()
Returns the value of thestrokeWidth
field.
-
-
-
Constructor Detail
-
NSVGShape
public NSVGShape(java.nio.ByteBuffer container)
Creates aNSVGShape
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
id
public java.nio.ByteBuffer id()
Returns aByteBuffer
view of theid
field.
-
idString
public java.lang.String idString()
Decodes the null-terminated string stored in theid
field.
-
opacity
public float opacity()
Returns the value of theopacity
field.
-
strokeWidth
public float strokeWidth()
Returns the value of thestrokeWidth
field.
-
strokeDashOffset
public float strokeDashOffset()
Returns the value of thestrokeDashOffset
field.
-
strokeDashArray
public java.nio.FloatBuffer strokeDashArray()
Returns aFloatBuffer
view of thestrokeDashArray
field.
-
strokeDashArray
public float strokeDashArray(int index)
Returns the value at the specified index of thestrokeDashArray
field.
-
strokeDashCount
public byte strokeDashCount()
Returns the value of thestrokeDashCount
field.
-
strokeLineJoin
public byte strokeLineJoin()
Returns the value of thestrokeLineJoin
field.
-
strokeLineCap
public byte strokeLineCap()
Returns the value of thestrokeLineCap
field.
-
miterLimit
public float miterLimit()
Returns the value of themiterLimit
field.
-
fillRule
public byte fillRule()
Returns the value of thefillRule
field.
-
flags
public byte flags()
Returns the value of theflags
field.
-
bounds
public java.nio.FloatBuffer bounds()
Returns aFloatBuffer
view of thebounds
field.
-
bounds
public float bounds(int index)
Returns the value at the specified index of thebounds
field.
-
create
public static NSVGShape create(long address)
Returns a newNSVGShape
instance for the specified memory address.
-
createSafe
@Nullable public static NSVGShape createSafe(long address)
-
create
public static NSVGShape.Buffer create(long address, int capacity)
Create aNSVGShape.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static NSVGShape.Buffer createSafe(long address, int capacity)
-
nid
public static java.nio.ByteBuffer nid(long struct)
Unsafe version ofid()
.
-
nidString
public static java.lang.String nidString(long struct)
Unsafe version ofidString()
.
-
nopacity
public static float nopacity(long struct)
Unsafe version ofopacity()
.
-
nstrokeWidth
public static float nstrokeWidth(long struct)
Unsafe version ofstrokeWidth()
.
-
nstrokeDashOffset
public static float nstrokeDashOffset(long struct)
Unsafe version ofstrokeDashOffset()
.
-
nstrokeDashArray
public static java.nio.FloatBuffer nstrokeDashArray(long struct)
Unsafe version ofstrokeDashArray()
.
-
nstrokeDashArray
public static float nstrokeDashArray(long struct, int index)
Unsafe version ofstrokeDashArray
.
-
nstrokeDashCount
public static byte nstrokeDashCount(long struct)
Unsafe version ofstrokeDashCount()
.
-
nstrokeLineJoin
public static byte nstrokeLineJoin(long struct)
Unsafe version ofstrokeLineJoin()
.
-
nstrokeLineCap
public static byte nstrokeLineCap(long struct)
Unsafe version ofstrokeLineCap()
.
-
nmiterLimit
public static float nmiterLimit(long struct)
Unsafe version ofmiterLimit()
.
-
nfillRule
public static byte nfillRule(long struct)
Unsafe version offillRule()
.
-
nflags
public static byte nflags(long struct)
Unsafe version offlags()
.
-
nbounds
public static java.nio.FloatBuffer nbounds(long struct)
Unsafe version ofbounds()
.
-
nbounds
public static float nbounds(long struct, int index)
Unsafe version ofbounds
.
-
-