Package org.lwjgl.nanovg
Class NSVGGradientStop
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.nanovg.NSVGGradientStop
-
- All Implemented Interfaces:
org.lwjgl.system.Pointer
public class NSVGGradientStop extends org.lwjgl.system.Struct
Layout
struct NSVGgradientStop { unsigned int color; float offset; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NSVGGradientStop.Buffer
An array ofNSVGGradientStop
structs.
-
Constructor Summary
Constructors Constructor Description NSVGGradientStop(java.nio.ByteBuffer container)
Creates aNSVGGradientStop
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 NSVGGradientStop
create(long address)
Returns a newNSVGGradientStop
instance for the specified memory address.static NSVGGradientStop.Buffer
create(long address, int capacity)
Create aNSVGGradientStop.Buffer
instance at the specified memory.static NSVGGradientStop
createSafe(long address)
static NSVGGradientStop.Buffer
createSafe(long address, int capacity)
static int
ncolor(long struct)
Unsafe version ofcolor()
.static float
noffset(long struct)
Unsafe version ofoffset()
.float
offset()
Returns the value of theoffset
field.int
sizeof()
-
-
-
Constructor Detail
-
NSVGGradientStop
public NSVGGradientStop(java.nio.ByteBuffer container)
Creates aNSVGGradientStop
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
-
color
public int color()
Returns the value of thecolor
field.
-
offset
public float offset()
Returns the value of theoffset
field.
-
create
public static NSVGGradientStop create(long address)
Returns a newNSVGGradientStop
instance for the specified memory address.
-
createSafe
@Nullable public static NSVGGradientStop createSafe(long address)
-
create
public static NSVGGradientStop.Buffer create(long address, int capacity)
Create aNSVGGradientStop.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static NSVGGradientStop.Buffer createSafe(long address, int capacity)
-
ncolor
public static int ncolor(long struct)
Unsafe version ofcolor()
.
-
noffset
public static float noffset(long struct)
Unsafe version ofoffset()
.
-
-