Package org.lwjgl.nanovg
Class NSVGPath
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.nanovg.NSVGPath
-
- All Implemented Interfaces:
org.lwjgl.system.Pointer
public class NSVGPath extends org.lwjgl.system.Struct
Member documentation
pts
– cubic bezier points:x0,y0, [cpx1,cpx1,cpx2,cpy2,x1,y1], ...
npts
– total number of bezier pointsclosed
– flag indicating if shapes should be treated as closedbounds[4]
– tight bounding box of the shape[minx,miny,maxx,maxy]
next
– pointer to next path, orNULL
if last element
Layout
struct NSVGpath { float * pts; int npts; char closed; float bounds[4];
NSVGpath
* next; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NSVGPath.Buffer
An array ofNSVGPath
structs.
-
Constructor Summary
Constructors Constructor Description NSVGPath(java.nio.ByteBuffer container)
Creates aNSVGPath
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.byte
closed()
Returns the value of theclosed
field.static NSVGPath
create(long address)
Returns a newNSVGPath
instance for the specified memory address.static NSVGPath.Buffer
create(long address, int capacity)
Create aNSVGPath.Buffer
instance at the specified memory.static NSVGPath
createSafe(long address)
static NSVGPath.Buffer
createSafe(long address, int capacity)
static java.nio.FloatBuffer
nbounds(long struct)
Unsafe version ofbounds()
.static float
nbounds(long struct, int index)
Unsafe version ofbounds
.static byte
nclosed(long struct)
Unsafe version ofclosed()
.NSVGPath
next()
Returns aNSVGPath
view of the struct pointed to by thenext
field.static NSVGPath
nnext(long struct)
Unsafe version ofnext()
.static int
nnpts(long struct)
Unsafe version ofnpts()
.int
npts()
Returns the value of thenpts
field.static java.nio.FloatBuffer
npts(long struct)
Unsafe version ofpts
.java.nio.FloatBuffer
pts()
Returns aFloatBuffer
view of the data pointed to by thepts
field.int
sizeof()
-
-
-
Constructor Detail
-
NSVGPath
public NSVGPath(java.nio.ByteBuffer container)
Creates aNSVGPath
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
-
pts
public java.nio.FloatBuffer pts()
Returns aFloatBuffer
view of the data pointed to by thepts
field.
-
npts
public int npts()
Returns the value of thenpts
field.
-
closed
public byte closed()
Returns the value of theclosed
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 NSVGPath create(long address)
Returns a newNSVGPath
instance for the specified memory address.
-
createSafe
@Nullable public static NSVGPath createSafe(long address)
-
create
public static NSVGPath.Buffer create(long address, int capacity)
Create aNSVGPath.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static NSVGPath.Buffer createSafe(long address, int capacity)
-
npts
public static java.nio.FloatBuffer npts(long struct)
Unsafe version ofpts
.
-
nnpts
public static int nnpts(long struct)
Unsafe version ofnpts()
.
-
nclosed
public static byte nclosed(long struct)
Unsafe version ofclosed()
.
-
nbounds
public static java.nio.FloatBuffer nbounds(long struct)
Unsafe version ofbounds()
.
-
nbounds
public static float nbounds(long struct, int index)
Unsafe version ofbounds
.
-
-