Package com.raylib
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 TypeMethodDescriptionstatic Color
allocateArray
(long elementCount) Allocate an array of Colorstatic Color
allocateArray
(long elementCount, SegmentAllocator allocator) Allocate an array of Colorboolean
Equality is tested on basis of both wrapper objects must refer to same native memory location to be considered equalbyte
getA()
Color alpha valuegetArrayElement
(int index) byte
getB()
Color blue valuebyte
getG()
Color green valuebyte
getR()
Color red valueint
hashCode()
setA
(byte value) Color alpha valuesetB
(byte value) Color blue valuesetG
(byte value) Color green valuesetR
(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
Color red value -
getG
public byte getG()Color green value -
setG
Color green value -
getB
public byte getB()Color blue value -
setB
Color blue value -
getA
public byte getA()Color alpha value -
setA
Color alpha value
-