Package org.lwjgl.nanovg
Class NSVGPaint
- All Implemented Interfaces:
Pointer
struct NSVGpaint {
signed char type;
union {
unsigned int color;
{@link NSVGGradient NSVGgradient} * gradient;
};
}
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct size in bytes.static final int
The struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorsConstructorDescriptionNSVGPaint
(ByteBuffer container) Creates aNSVGPaint
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionint
color()
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 @Nullable NSVGPaint
createSafe
(long address) static @Nullable NSVGPaint.Buffer
createSafe
(long address, int capacity) gradient()
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()
Returnssizeof(struct)
.byte
type()
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
TYPE
public static final int TYPEThe struct member offsets. -
COLOR
public static final int COLORThe struct member offsets. -
GRADIENT
public static final int GRADIENTThe struct member offsets.
-
-
Constructor Details
-
NSVGPaint
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 Details
-
sizeof
public int sizeof()Description copied from class:Struct
Returnssizeof(struct)
. -
type
public byte type()- Returns:
- the value of the
type
field.
-
color
public int color()- Returns:
- the value of the
color
field.
-
gradient
- Returns:
- a
NSVGGradient
view of the struct pointed to by thegradient
field.
-
create
Returns a newNSVGPaint
instance for the specified memory address. -
createSafe
-
create
Create aNSVGPaint.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
ntype
public static byte ntype(long struct) Unsafe version oftype()
. -
ncolor
public static int ncolor(long struct) Unsafe version ofcolor()
. -
ngradient
Unsafe version ofgradient()
.
-