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.StructMember documentation
id– 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– 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– tight bounding box of the shape[minx,miny,maxx,maxy]paths– linked list of paths in the imagenext– pointer to next shape, orNULLif last element
Layout
struct NSVGshape { char id[64];NSVGpaintfill;NSVGpaintstroke; 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 classNSVGShape.BufferAn array ofNSVGShapestructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intBOUNDS
FILL
FILLRULE
FLAGS
ID
MITERLIMIT
NEXT
OPACITY
PATHSThe struct member offsets.static intSIZEOFThe struct size in bytes.static intSTROKE
STROKEDASHARRAY
STROKEDASHCOUNT
STROKEDASHOFFSET
STROKELINECAP
STROKELINEJOIN
STROKEWIDTHThe struct member offsets.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.FloatBufferbounds()Returns aFloatBufferview of theboundsfield.floatbounds(int index)Returns the value at the specified index of theboundsfield.static NSVGShapecreate(long address)Returns a newNSVGShapeinstance for the specified memory address.static NSVGShape.Buffercreate(long address, int capacity)Create aNSVGShape.Bufferinstance at the specified memory.static NSVGShapecreateSafe(long address)static NSVGShape.BuffercreateSafe(long address, int capacity)NSVGPaintfill()Returns aNSVGPaintview of thefillfield.bytefillRule()Returns the value of thefillRulefield.byteflags()Returns the value of theflagsfield.java.nio.ByteBufferid()Returns aByteBufferview of theidfield.java.lang.StringidString()Decodes the null-terminated string stored in theidfield.floatmiterLimit()Returns the value of themiterLimitfield.static java.nio.FloatBuffernbounds(long struct)Unsafe version ofbounds().static floatnbounds(long struct, int index)Unsafe version ofbounds.NSVGShapenext()Returns aNSVGShapeview of the struct pointed to by thenextfield.static NSVGPaintnfill(long struct)Unsafe version offill().static bytenfillRule(long struct)Unsafe version offillRule().static bytenflags(long struct)Unsafe version offlags().static java.nio.ByteBuffernid(long struct)Unsafe version ofid().static java.lang.StringnidString(long struct)Unsafe version ofidString().static floatnmiterLimit(long struct)Unsafe version ofmiterLimit().static NSVGShapennext(long struct)Unsafe version ofnext().static floatnopacity(long struct)Unsafe version ofopacity().static NSVGPathnpaths(long struct)Unsafe version ofpaths().static NSVGPaintnstroke(long struct)Unsafe version ofstroke().static java.nio.FloatBuffernstrokeDashArray(long struct)Unsafe version ofstrokeDashArray().static floatnstrokeDashArray(long struct, int index)Unsafe version ofstrokeDashArray.static bytenstrokeDashCount(long struct)Unsafe version ofstrokeDashCount().static floatnstrokeDashOffset(long struct)Unsafe version ofstrokeDashOffset().static bytenstrokeLineCap(long struct)Unsafe version ofstrokeLineCap().static bytenstrokeLineJoin(long struct)Unsafe version ofstrokeLineJoin().static floatnstrokeWidth(long struct)Unsafe version ofstrokeWidth().floatopacity()Returns the value of theopacityfield.NSVGPathpaths()Returns aNSVGPathview of the struct pointed to by thepathsfield.intsizeof()NSVGPaintstroke()Returns aNSVGPaintview of thestrokefield.java.nio.FloatBufferstrokeDashArray()Returns aFloatBufferview of thestrokeDashArrayfield.floatstrokeDashArray(int index)Returns the value at the specified index of thestrokeDashArrayfield.bytestrokeDashCount()Returns the value of thestrokeDashCountfield.floatstrokeDashOffset()Returns the value of thestrokeDashOffsetfield.bytestrokeLineCap()Returns the value of thestrokeLineCapfield.bytestrokeLineJoin()Returns the value of thestrokeLineJoinfield.floatstrokeWidth()Returns the value of thestrokeWidthfield.
-
-
-
Constructor Detail
-
NSVGShape
public NSVGShape(java.nio.ByteBuffer container)
Creates aNSVGShapeinstance 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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
id
public java.nio.ByteBuffer id()
Returns aByteBufferview of theidfield.
-
idString
public java.lang.String idString()
Decodes the null-terminated string stored in theidfield.
-
opacity
public float opacity()
Returns the value of theopacityfield.
-
strokeWidth
public float strokeWidth()
Returns the value of thestrokeWidthfield.
-
strokeDashOffset
public float strokeDashOffset()
Returns the value of thestrokeDashOffsetfield.
-
strokeDashArray
public java.nio.FloatBuffer strokeDashArray()
Returns aFloatBufferview of thestrokeDashArrayfield.
-
strokeDashArray
public float strokeDashArray(int index)
Returns the value at the specified index of thestrokeDashArrayfield.
-
strokeDashCount
public byte strokeDashCount()
Returns the value of thestrokeDashCountfield.
-
strokeLineJoin
public byte strokeLineJoin()
Returns the value of thestrokeLineJoinfield.
-
strokeLineCap
public byte strokeLineCap()
Returns the value of thestrokeLineCapfield.
-
miterLimit
public float miterLimit()
Returns the value of themiterLimitfield.
-
fillRule
public byte fillRule()
Returns the value of thefillRulefield.
-
flags
public byte flags()
Returns the value of theflagsfield.
-
bounds
public java.nio.FloatBuffer bounds()
Returns aFloatBufferview of theboundsfield.
-
bounds
public float bounds(int index)
Returns the value at the specified index of theboundsfield.
-
create
public static NSVGShape create(long address)
Returns a newNSVGShapeinstance 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.Bufferinstance 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.
-
-