public class NSVGShape
extends org.lwjgl.system.Struct
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, or NULL if last element
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;
}| Modifier and Type | Class and Description |
|---|---|
static class |
NSVGShape.Buffer
An array of
NSVGShape structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
BOUNDS
The struct member offsets.
|
static int |
FILL
The struct member offsets.
|
static int |
FILLRULE
The struct member offsets.
|
static int |
FLAGS
The struct member offsets.
|
static int |
ID
The struct member offsets.
|
static int |
MITERLIMIT
The struct member offsets.
|
static int |
NEXT
The struct member offsets.
|
static int |
OPACITY
The struct member offsets.
|
static int |
PATHS
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
static int |
STROKE
The struct member offsets.
|
static int |
STROKEDASHARRAY
The struct member offsets.
|
static int |
STROKEDASHCOUNT
The struct member offsets.
|
static int |
STROKEDASHOFFSET
The struct member offsets.
|
static int |
STROKELINECAP
The struct member offsets.
|
static int |
STROKELINEJOIN
The struct member offsets.
|
static int |
STROKEWIDTH
The struct member offsets.
|
| Constructor and Description |
|---|
NSVGShape(java.nio.ByteBuffer container)
Creates a
NSVGShape instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
java.nio.FloatBuffer |
bounds()
Returns a
FloatBuffer view of the bounds field. |
float |
bounds(int index)
Returns the value at the specified index of the
bounds field. |
static NSVGShape |
create(long address)
Returns a new
NSVGShape instance for the specified memory address. |
static NSVGShape.Buffer |
create(long address,
int capacity)
Create a
NSVGShape.Buffer instance at the specified memory. |
static NSVGShape |
createSafe(long address)
|
static NSVGShape.Buffer |
createSafe(long address,
int capacity)
|
NSVGPaint |
fill()
Returns a
NSVGPaint view of the fill field. |
byte |
fillRule()
Returns the value of the
fillRule field. |
byte |
flags()
Returns the value of the
flags field. |
java.nio.ByteBuffer |
id()
Returns a
ByteBuffer view of the id field. |
java.lang.String |
idString()
Decodes the null-terminated string stored in the
id field. |
float |
miterLimit()
Returns the value of the
miterLimit field. |
static java.nio.FloatBuffer |
nbounds(long struct)
Unsafe version of
bounds(). |
static float |
nbounds(long struct,
int index)
Unsafe version of
bounds. |
NSVGShape |
next()
Returns a
NSVGShape view of the struct pointed to by the next field. |
static NSVGPaint |
nfill(long struct)
Unsafe version of
fill(). |
static byte |
nfillRule(long struct)
Unsafe version of
fillRule(). |
static byte |
nflags(long struct)
Unsafe version of
flags(). |
static java.nio.ByteBuffer |
nid(long struct)
Unsafe version of
id(). |
static java.lang.String |
nidString(long struct)
Unsafe version of
idString(). |
static float |
nmiterLimit(long struct)
Unsafe version of
miterLimit(). |
static NSVGShape |
nnext(long struct)
Unsafe version of
next(). |
static float |
nopacity(long struct)
Unsafe version of
opacity(). |
static NSVGPath |
npaths(long struct)
Unsafe version of
paths(). |
static NSVGPaint |
nstroke(long struct)
Unsafe version of
stroke(). |
static java.nio.FloatBuffer |
nstrokeDashArray(long struct)
Unsafe version of
strokeDashArray(). |
static float |
nstrokeDashArray(long struct,
int index)
Unsafe version of
strokeDashArray. |
static byte |
nstrokeDashCount(long struct)
Unsafe version of
strokeDashCount(). |
static float |
nstrokeDashOffset(long struct)
Unsafe version of
strokeDashOffset(). |
static byte |
nstrokeLineCap(long struct)
Unsafe version of
strokeLineCap(). |
static byte |
nstrokeLineJoin(long struct)
Unsafe version of
strokeLineJoin(). |
static float |
nstrokeWidth(long struct)
Unsafe version of
strokeWidth(). |
float |
opacity()
Returns the value of the
opacity field. |
NSVGPath |
paths()
Returns a
NSVGPath view of the struct pointed to by the paths field. |
int |
sizeof() |
NSVGPaint |
stroke()
Returns a
NSVGPaint view of the stroke field. |
java.nio.FloatBuffer |
strokeDashArray()
Returns a
FloatBuffer view of the strokeDashArray field. |
float |
strokeDashArray(int index)
Returns the value at the specified index of the
strokeDashArray field. |
byte |
strokeDashCount()
Returns the value of the
strokeDashCount field. |
float |
strokeDashOffset()
Returns the value of the
strokeDashOffset field. |
byte |
strokeLineCap()
Returns the value of the
strokeLineCap field. |
byte |
strokeLineJoin()
Returns the value of the
strokeLineJoin field. |
float |
strokeWidth()
Returns the value of the
strokeWidth field. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int ID
public static final int FILL
public static final int STROKE
public static final int OPACITY
public static final int STROKEWIDTH
public static final int STROKEDASHOFFSET
public static final int STROKEDASHARRAY
public static final int STROKEDASHCOUNT
public static final int STROKELINEJOIN
public static final int STROKELINECAP
public static final int MITERLIMIT
public static final int FILLRULE
public static final int FLAGS
public static final int BOUNDS
public static final int PATHS
public static final int NEXT
public NSVGShape(java.nio.ByteBuffer container)
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.
public int sizeof()
sizeof in class org.lwjgl.system.Structpublic java.nio.ByteBuffer id()
ByteBuffer view of the id field.public java.lang.String idString()
id field.public float opacity()
opacity field.public float strokeWidth()
strokeWidth field.public float strokeDashOffset()
strokeDashOffset field.public java.nio.FloatBuffer strokeDashArray()
FloatBuffer view of the strokeDashArray field.public float strokeDashArray(int index)
strokeDashArray field.public byte strokeDashCount()
strokeDashCount field.public byte strokeLineJoin()
strokeLineJoin field.public byte strokeLineCap()
strokeLineCap field.public float miterLimit()
miterLimit field.public byte fillRule()
fillRule field.public byte flags()
flags field.public java.nio.FloatBuffer bounds()
FloatBuffer view of the bounds field.public float bounds(int index)
bounds field.public static NSVGShape create(long address)
NSVGShape instance for the specified memory address.@Nullable public static NSVGShape createSafe(long address)
public static NSVGShape.Buffer create(long address, int capacity)
NSVGShape.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static NSVGShape.Buffer createSafe(long address, int capacity)
public static java.nio.ByteBuffer nid(long struct)
id().public static java.lang.String nidString(long struct)
idString().public static float nopacity(long struct)
opacity().public static float nstrokeWidth(long struct)
strokeWidth().public static float nstrokeDashOffset(long struct)
strokeDashOffset().public static java.nio.FloatBuffer nstrokeDashArray(long struct)
strokeDashArray().public static float nstrokeDashArray(long struct,
int index)
strokeDashArray.public static byte nstrokeDashCount(long struct)
strokeDashCount().public static byte nstrokeLineJoin(long struct)
strokeLineJoin().public static byte nstrokeLineCap(long struct)
strokeLineCap().public static float nmiterLimit(long struct)
miterLimit().public static byte nfillRule(long struct)
fillRule().public static byte nflags(long struct)
flags().public static java.nio.FloatBuffer nbounds(long struct)
bounds().public static float nbounds(long struct,
int index)
bounds.Copyright LWJGL. All Rights Reserved. License terms.