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.Struct
Layout
struct NSVGpaint { char type; union { unsigned int color;
NSVGgradient
* gradient; }; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NSVGPaint.Buffer
An array ofNSVGPaint
structs.
-
Constructor Summary
Constructors Constructor Description NSVGPaint(java.nio.ByteBuffer container)
Creates aNSVGPaint
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
color()
Returns the value of thecolor
field.static NSVGPaint
create(long address)
Returns a newNSVGPaint
instance for the specified memory address.static NSVGPaint.Buffer
create(long address, int capacity)
Create aNSVGPaint.Buffer
instance at the specified memory.static NSVGPaint
createSafe(long address)
static NSVGPaint.Buffer
createSafe(long address, int capacity)
NSVGGradient
gradient()
Returns aNSVGGradient
view of the struct pointed to by thegradient
field.static int
ncolor(long struct)
Unsafe version ofcolor()
.static NSVGGradient
ngradient(long struct)
Unsafe version ofgradient()
.static byte
ntype(long struct)
Unsafe version oftype()
.int
sizeof()
byte
type()
Returns the value of thetype
field.
-
-
-
Constructor Detail
-
NSVGPaint
public NSVGPaint(java.nio.ByteBuffer container)
Creates aNSVGPaint
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
-
type
public byte type()
Returns the value of thetype
field.
-
color
public int color()
Returns the value of thecolor
field.
-
gradient
public NSVGGradient gradient()
Returns aNSVGGradient
view of the struct pointed to by thegradient
field.
-
create
public static NSVGPaint create(long address)
Returns a newNSVGPaint
instance 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.Buffer
instance 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()
.
-
-