Package org.lwjgl.nanovg
Class NSVGPaint
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.nanovg.NSVGPaint
-
- All Implemented Interfaces:
org.lwjgl.system.Pointer
public class NSVGPaint extends org.lwjgl.system.StructLayout
struct NSVGpaint { char type; union { unsigned int color;NSVGgradient* gradient; }; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNSVGPaint.BufferAn array ofNSVGPaintstructs.
-
Constructor Summary
Constructors Constructor Description NSVGPaint(java.nio.ByteBuffer container)Creates aNSVGPaintinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcolor()static NSVGPaintcreate(long address)Returns a newNSVGPaintinstance for the specified memory address.static NSVGPaint.Buffercreate(long address, int capacity)Create aNSVGPaint.Bufferinstance at the specified memory.static NSVGPaintcreateSafe(long address)static NSVGPaint.BuffercreateSafe(long address, int capacity)NSVGGradientgradient()static intncolor(long struct)Unsafe version ofcolor().static NSVGGradientngradient(long struct)Unsafe version ofgradient().static bytentype(long struct)Unsafe version oftype().intsizeof()bytetype()
-
-
-
Constructor Detail
-
NSVGPaint
public NSVGPaint(java.nio.ByteBuffer container)
Creates aNSVGPaintinstance 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
-
type
public byte type()
- Returns:
- the value of the
typefield.
-
color
public int color()
- Returns:
- the value of the
colorfield.
-
gradient
public NSVGGradient gradient()
- Returns:
- a
NSVGGradientview of the struct pointed to by thegradientfield.
-
create
public static NSVGPaint create(long address)
Returns a newNSVGPaintinstance for the specified memory address.
-
createSafe
@Nullable public static NSVGPaint createSafe(long address)
-
create
public static NSVGPaint.Buffer create(long address, int capacity)
Create aNSVGPaint.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static NSVGPaint.Buffer createSafe(long address, int capacity)
-
ntype
public static byte ntype(long struct)
Unsafe version oftype().
-
ncolor
public static int ncolor(long struct)
Unsafe version ofcolor().
-
ngradient
public static NSVGGradient ngradient(long struct)
Unsafe version ofgradient().
-
-