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.StructLayout
struct NSVGshape { charid()[64];NSVGpaintfill();NSVGpaintstroke(); floatopacity(); floatstrokeWidth(); floatstrokeDashOffset(); floatstrokeDashArray()[8]; charstrokeDashCount(); charstrokeLineJoin(); charstrokeLineCap(); floatmiterLimit(); charfillRule(); unsigned charflags(); floatbounds()[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.
-
Constructor Summary
Constructors Constructor Description NSVGShape(java.nio.ByteBuffer container)Creates aNSVGShapeinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.FloatBufferbounds()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)NSVGPaintfill()fill paintbytefillRule()fill rule, see NSVGfillRulebyteflags()logical or of NSVG_FLAGS_* flagsjava.nio.ByteBufferid()optional 'id' attr of the shape or its groupjava.lang.StringidString()optional 'id' attr of the shape or its groupfloatmiterLimit()miter limitstatic java.nio.FloatBuffernbounds(long struct)Unsafe version ofbounds().static floatnbounds(long struct, int index)Unsafe version ofbounds.NSVGShapenext()pointer to next shape, orNULLif last elementstatic 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()opacity of the shapeNSVGPathpaths()linked list of paths in the imageintsizeof()NSVGPaintstroke()stroke paintjava.nio.FloatBufferstrokeDashArray()stroke dash array (scaled)floatstrokeDashArray(int index)stroke dash array (scaled)bytestrokeDashCount()number of dash values in dash arrayfloatstrokeDashOffset()stroke dash offset (scaled)bytestrokeLineCap()stroke cap typebytestrokeLineJoin()stroke join typefloatstrokeWidth()stroke width (scaled)
-
-
-
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, idString
public java.nio.ByteBuffer id() public java.lang.String idString()
optional 'id' attr of the shape or its group
-
fill
public NSVGPaint fill()
fill paint
-
stroke
public NSVGPaint 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
public java.nio.FloatBuffer 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
public java.nio.FloatBuffer bounds() public float bounds(int index)
tight bounding box of the shape[minx,miny,maxx,maxy]
-
paths
public NSVGPath paths()
linked list of paths in the image
-
next
public NSVGShape next()
pointer to next shape, orNULLif last element
-
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.
-
-