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.StructMember 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 classNSVGImage.BufferAn array ofNSVGImagestructs.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NSVGImagecreate(long address)Returns a newNSVGImageinstance for the specified memory address.static NSVGImage.Buffercreate(long address, int capacity)Create aNSVGImage.Bufferinstance at the specified memory.static NSVGImagecreateSafe(long address)static NSVGImage.BuffercreateSafe(long address, int capacity)floatheight()Returns the value of theheightfield.static floatnheight(long struct)Unsafe version ofheight().static NSVGShapenshapes(long struct)Unsafe version ofshapes().static floatnwidth(long struct)Unsafe version ofwidth().NSVGShapeshapes()Returns aNSVGShapeview of the struct pointed to by theshapesfield.intsizeof()floatwidth()Returns the value of thewidthfield.
-
-
-
Constructor Detail
-
NSVGImage
public NSVGImage(java.nio.ByteBuffer container)
Creates aNSVGImageinstance 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
-
width
public float width()
Returns the value of thewidthfield.
-
height
public float height()
Returns the value of theheightfield.
-
shapes
public NSVGShape shapes()
Returns aNSVGShapeview of the struct pointed to by theshapesfield.
-
create
public static NSVGImage create(long address)
Returns a newNSVGImageinstance 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.Bufferinstance 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().
-
-