Class Color

java.lang.Object
com.raylib.jextract.Color

public class Color extends Object
struct Color {
    unsigned char r;
    unsigned char g;
    unsigned char b;
    unsigned char a;
}
  • Method Details

    • layout

      public static final GroupLayout layout()
      The layout of this struct
    • r$layout

      public static final ValueLayout.OfByte r$layout()
      Layout for field:
      unsigned char r
      
    • r$offset

      public static final long r$offset()
      Offset for field:
      unsigned char r
      
    • r

      public static byte r(MemorySegment struct)
      Getter for field:
      unsigned char r
      
    • r

      public static void r(MemorySegment struct, byte fieldValue)
      Setter for field:
      unsigned char r
      
    • g$layout

      public static final ValueLayout.OfByte g$layout()
      Layout for field:
      unsigned char g
      
    • g$offset

      public static final long g$offset()
      Offset for field:
      unsigned char g
      
    • g

      public static byte g(MemorySegment struct)
      Getter for field:
      unsigned char g
      
    • g

      public static void g(MemorySegment struct, byte fieldValue)
      Setter for field:
      unsigned char g
      
    • b$layout

      public static final ValueLayout.OfByte b$layout()
      Layout for field:
      unsigned char b
      
    • b$offset

      public static final long b$offset()
      Offset for field:
      unsigned char b
      
    • b

      public static byte b(MemorySegment struct)
      Getter for field:
      unsigned char b
      
    • b

      public static void b(MemorySegment struct, byte fieldValue)
      Setter for field:
      unsigned char b
      
    • a$layout

      public static final ValueLayout.OfByte a$layout()
      Layout for field:
      unsigned char a
      
    • a$offset

      public static final long a$offset()
      Offset for field:
      unsigned char a
      
    • a

      public static byte a(MemorySegment struct)
      Getter for field:
      unsigned char a
      
    • a

      public static void a(MemorySegment struct, byte fieldValue)
      Setter for field:
      unsigned char a
      
    • asSlice

      public static MemorySegment asSlice(MemorySegment array, long index)
      Obtains a slice of arrayParam which selects the array element at index. The returned segment has address arrayParam.address() + index * layout().byteSize()
    • sizeof

      public static long sizeof()
      The size (in bytes) of this struct
    • allocate

      public static MemorySegment allocate(SegmentAllocator allocator)
      Allocate a segment of size layout().byteSize() using allocator
    • allocateArray

      public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator)
      Allocate an array of size elementCount using allocator. The returned segment has size elementCount * layout().byteSize().
    • reinterpret

      public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer<MemorySegment> cleanup)
      Reinterprets addr using target arena and cleanupAction (if any). The returned segment has size layout().byteSize()
    • reinterpret

      public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer<MemorySegment> cleanup)
      Reinterprets addr using target arena and cleanupAction (if any). The returned segment has size elementCount * layout().byteSize()