Package org.lwjgl.nanovg
Class NSVGImage
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.nanovg.NSVGImage
-
- All Implemented Interfaces:
org.lwjgl.system.Pointer
public class NSVGImage extends org.lwjgl.system.Struct
Member documentation
width
– Width of the image.height
– Height of the image.shapes
– lLinked list of shapes in the image
Layout
struct NSVGimage { float width; float height;
NSVGshape
* shapes; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NSVGImage.Buffer
An array ofNSVGImage
structs.
-
Constructor Summary
Constructors Constructor Description NSVGImage(java.nio.ByteBuffer container)
Creates aNSVGImage
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NSVGImage
create(long address)
Returns a newNSVGImage
instance for the specified memory address.static NSVGImage.Buffer
create(long address, int capacity)
Create aNSVGImage.Buffer
instance at the specified memory.static NSVGImage
createSafe(long address)
static NSVGImage.Buffer
createSafe(long address, int capacity)
float
height()
Returns the value of theheight
field.static float
nheight(long struct)
Unsafe version ofheight()
.static NSVGShape
nshapes(long struct)
Unsafe version ofshapes()
.static float
nwidth(long struct)
Unsafe version ofwidth()
.NSVGShape
shapes()
Returns aNSVGShape
view of the struct pointed to by theshapes
field.int
sizeof()
float
width()
Returns the value of thewidth
field.
-
-
-
Constructor Detail
-
NSVGImage
public NSVGImage(java.nio.ByteBuffer container)
Creates aNSVGImage
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
-
width
public float width()
Returns the value of thewidth
field.
-
height
public float height()
Returns the value of theheight
field.
-
shapes
public NSVGShape shapes()
Returns aNSVGShape
view of the struct pointed to by theshapes
field.
-
create
public static NSVGImage create(long address)
Returns a newNSVGImage
instance for the specified memory address.
-
createSafe
@Nullable public static NSVGImage createSafe(long address)
-
create
public static NSVGImage.Buffer create(long address, int capacity)
Create aNSVGImage.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static NSVGImage.Buffer createSafe(long address, int capacity)
-
nwidth
public static float nwidth(long struct)
Unsafe version ofwidth()
.
-
nheight
public static float nheight(long struct)
Unsafe version ofheight()
.
-
-