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.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe 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 aNSVGPaintinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionintcolor()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 @Nullable NSVGPaintcreateSafe(long address) static @Nullable NSVGPaint.BuffercreateSafe(long address, int capacity) gradient()static intncolor(long struct) Unsafe version ofcolor().static NSVGGradientngradient(long struct) Unsafe version ofgradient().static bytentype(long struct) Unsafe version oftype().intsizeof()Returnssizeof(struct).bytetype()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 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 Details
-
sizeof
public int sizeof()Description copied from class:StructReturnssizeof(struct). -
type
public byte type()- Returns:
- the value of the
typefield.
-
color
public int color()- Returns:
- the value of the
colorfield.
-
gradient
- Returns:
- a
NSVGGradientview of the struct pointed to by thegradientfield.
-
create
Returns a newNSVGPaintinstance for the specified memory address. -
createSafe
-
create
Create aNSVGPaint.Bufferinstance 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().
-