Package org.lwjgl.nanovg
Class NSVGShape
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<NSVGShape>
org.lwjgl.nanovg.NSVGShape
- All Implemented Interfaces:
org.lwjgl.system.Pointer
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 Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionNSVGShape(ByteBuffer container) Creates aNSVGShapeinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionbounds()tight bounding box of the shape[minx,miny,maxx,maxy]floatbounds(int index) tight bounding box of the shape[minx,miny,maxx,maxy]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) fill()fill paintoptional 'id' of fill gradientoptional 'id' of fill gradientbytefillRule()fill rule, see NSVGfillRulebyteflags()logical or of NSVG_FLAGS_* flagsid()optional 'id' attr of the shape or its groupidString()optional 'id' attr of the shape or its groupfloatmiter limitstatic FloatBuffernbounds(long struct) Unsafe version ofbounds().static floatnbounds(long struct, int index) Unsafe version ofbounds.next()pointer to next shape, orNULLif last elementstatic NSVGPaintnfill(long struct) Unsafe version offill().static ByteBuffernfillGradient(long struct) Unsafe version offillGradient().static StringnfillGradientString(long struct) Unsafe version offillGradientString().static bytenfillRule(long struct) Unsafe version offillRule().static bytenflags(long struct) Unsafe version offlags().static ByteBuffernid(long struct) Unsafe version ofid().static 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 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 ByteBuffernstrokeGradient(long struct) Unsafe version ofstrokeGradient().static StringnstrokeGradientString(long struct) Unsafe version ofstrokeGradientString().static bytenstrokeLineCap(long struct) Unsafe version ofstrokeLineCap().static bytenstrokeLineJoin(long struct) Unsafe version ofstrokeLineJoin().static floatnstrokeWidth(long struct) Unsafe version ofstrokeWidth().static FloatBuffernxform(long struct) Unsafe version ofxform().static floatnxform(long struct, int index) Unsafe version ofxform.floatopacity()opacity of the shapepaths()linked list of paths in the imageintsizeof()stroke()stroke paintstroke dash array (scaled)floatstrokeDashArray(int index) stroke dash array (scaled)bytenumber of dash values in dash arrayfloatstroke dash offset (scaled)optional 'id' of stroke gradientoptional 'id' of stroke gradientbytestroke cap typebytestroke join typefloatstroke width (scaled)xform()root transformation for fill/stroke gradientfloatxform(int index) root transformation for fill/stroke gradientMethods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validateMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
ID
public static final int IDThe struct member offsets. -
FILL
public static final int FILLThe struct member offsets. -
STROKE
public static final int STROKEThe struct member offsets. -
OPACITY
public static final int OPACITYThe struct member offsets. -
STROKEWIDTH
public static final int STROKEWIDTHThe struct member offsets. -
STROKEDASHOFFSET
public static final int STROKEDASHOFFSETThe struct member offsets. -
STROKEDASHARRAY
public static final int STROKEDASHARRAYThe struct member offsets. -
STROKEDASHCOUNT
public static final int STROKEDASHCOUNTThe struct member offsets. -
STROKELINEJOIN
public static final int STROKELINEJOINThe struct member offsets. -
STROKELINECAP
public static final int STROKELINECAPThe struct member offsets. -
MITERLIMIT
public static final int MITERLIMITThe struct member offsets. -
FILLRULE
public static final int FILLRULEThe struct member offsets. -
FLAGS
public static final int FLAGSThe struct member offsets. -
BOUNDS
public static final int BOUNDSThe struct member offsets. -
FILLGRADIENT
public static final int FILLGRADIENTThe struct member offsets. -
STROKEGRADIENT
public static final int STROKEGRADIENTThe struct member offsets. -
XFORM
public static final int XFORMThe struct member offsets. -
PATHS
public static final int PATHSThe struct member offsets. -
NEXT
public static final int NEXTThe struct member offsets.
-
-
Constructor Details
-
NSVGShape
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 Details
-
sizeof
public int sizeof()- Specified by:
sizeofin classorg.lwjgl.system.Struct<NSVGShape>
-
id
optional 'id' attr of the shape or its group -
idString
optional 'id' attr of the shape or its group -
fill
fill paint -
stroke
stroke paint -
opacity
public float opacity()opacity of the shape -
strokeWidth
public float strokeWidth()stroke width (scaled) -
strokeDashOffset
public float strokeDashOffset()stroke dash offset (scaled) -
strokeDashArray
stroke dash array (scaled) -
strokeDashArray
public float strokeDashArray(int index) stroke dash array (scaled) -
strokeDashCount
public byte strokeDashCount()number of dash values in dash array -
strokeLineJoin
public byte strokeLineJoin()stroke join type -
strokeLineCap
public byte strokeLineCap()stroke cap type -
miterLimit
public float miterLimit()miter limit -
fillRule
public byte fillRule()fill rule, see NSVGfillRule -
flags
public byte flags()logical or of NSVG_FLAGS_* flags -
bounds
tight bounding box of the shape[minx,miny,maxx,maxy] -
bounds
public float bounds(int index) tight bounding box of the shape[minx,miny,maxx,maxy] -
fillGradient
optional 'id' of fill gradient -
fillGradientString
optional 'id' of fill gradient -
strokeGradient
optional 'id' of stroke gradient -
strokeGradientString
optional 'id' of stroke gradient -
xform
root transformation for fill/stroke gradient -
xform
public float xform(int index) root transformation for fill/stroke gradient -
paths
linked list of paths in the image -
next
pointer to next shape, orNULLif last element -
create
Returns a newNSVGShapeinstance for the specified memory address. -
createSafe
-
create
Create aNSVGShape.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
nid
Unsafe version ofid(). -
nidString
Unsafe version ofidString(). -
nfill
Unsafe version offill(). -
nstroke
Unsafe version ofstroke(). -
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
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
Unsafe version ofbounds(). -
nbounds
public static float nbounds(long struct, int index) Unsafe version ofbounds. -
nfillGradient
Unsafe version offillGradient(). -
nfillGradientString
Unsafe version offillGradientString(). -
nstrokeGradient
Unsafe version ofstrokeGradient(). -
nstrokeGradientString
Unsafe version ofstrokeGradientString(). -
nxform
Unsafe version ofxform(). -
nxform
public static float nxform(long struct, int index) Unsafe version ofxform. -
npaths
Unsafe version ofpaths(). -
nnext
Unsafe version ofnext().
-