Class Color
java.lang.Object
com.raylib.Color
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal MemorySegment
The native FFI MemorySegment that holds the data this object wraps. -
Constructor Summary
ConstructorsConstructorDescriptionColor()
Construct with auto memory allocator and fields initialized to zero.Color
(byte r, byte g, byte b, byte a) Construct with auto memory allocator and fields initialized as specifiedColor
(MemorySegment memorySegment) Construct by wrapping around an already allocated MemorySegment, perhaps from another objectColor
(SegmentAllocator arena) Construct with your owm memory allocator and fields not initializedColor
(SegmentAllocator arena, byte r, byte g, byte b, byte a) Construct with your own memory allocator and fields initialized as specified -
Method Summary
Modifier and TypeMethodDescriptionbyte
a()
Color alpha valuea
(byte value) Color alpha valuestatic Color
allocateArray
(long elementCount) Allocate an array of Colorstatic Color
allocateArray
(long elementCount, SegmentAllocator allocator) Allocate an array of Colorbyte
b()
Color blue valueb
(byte value) Color blue valueboolean
Equality is tested on basis of both wrapper objects must refer to same native memory location to be considered equalbyte
g()
Color green valueg
(byte value) Color green valuebyte
getA()
Color alpha valuegetArrayElement
(int index) byte
getB()
Color blue valuebyte
getG()
Color green valuebyte
getR()
Color red valueint
hashCode()
byte
r()
Color red valuer
(byte value) Color red valuevoid
setA
(byte value) Color alpha valuevoid
setB
(byte value) Color blue valuevoid
setG
(byte value) Color green valuevoid
setR
(byte value) Color red value
-
Field Details
-
memorySegment
The native FFI MemorySegment that holds the data this object wraps.
-
-
Constructor Details
-
Color
public Color()Construct with auto memory allocator and fields initialized to zero. -
Color
Construct with your owm memory allocator and fields not initialized -
Color
Construct by wrapping around an already allocated MemorySegment, perhaps from another object -
Color
public Color(byte r, byte g, byte b, byte a) Construct with auto memory allocator and fields initialized as specified- Parameters:
r
- Color red valueg
- Color green valueb
- Color blue valuea
- Color alpha value
-
Color
Construct with your own memory allocator and fields initialized as specified- Parameters:
r
- Color red valueg
- Color green valueb
- Color blue valuea
- Color alpha value
-
-
Method Details
-
equals
-
hashCode
-
getArrayElement
-
allocateArray
Allocate an array of Color -
allocateArray
Allocate an array of Color -
getR
public byte getR()Color red value -
setR
public void setR(byte value) Color red value -
r
public byte r()Color red value -
r
Color red value -
getG
public byte getG()Color green value -
setG
public void setG(byte value) Color green value -
g
public byte g()Color green value -
g
Color green value -
getB
public byte getB()Color blue value -
setB
public void setB(byte value) Color blue value -
b
public byte b()Color blue value -
b
Color blue value -
getA
public byte getA()Color alpha value -
setA
public void setA(byte value) Color alpha value -
a
public byte a()Color alpha value -
a
Color alpha value
-