Package com.raylib.jextract
Class Rectangle
java.lang.Object
com.raylib.jextract.Rectangle
struct Rectangle {
float x;
float y;
float width;
float height;
}
-
Method Summary
Modifier and TypeMethodDescriptionstatic MemorySegmentallocate(SegmentAllocator allocator) Allocate a segment of sizelayout().byteSize()usingallocatorstatic MemorySegmentallocateArray(long elementCount, SegmentAllocator allocator) Allocate an array of sizeelementCountusingallocator.static MemorySegmentasSlice(MemorySegment array, long index) Obtains a slice ofarrayParamwhich selects the array element atindex.static floatheight(MemorySegment struct) Getter for field:float heightstatic voidheight(MemorySegment struct, float fieldValue) Setter for field:float heightstatic final ValueLayout.OfFloatLayout for field:float heightstatic final longOffset for field:float heightstatic final GroupLayoutlayout()The layout of this structstatic MemorySegmentreinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer<MemorySegment> cleanup) Reinterpretsaddrusing targetarenaand invalid input: '{@code cleanupAction) (if any). The returned segment has size {@code elementCount * layout().byteSize()}'static MemorySegmentreinterpret(MemorySegment addr, Arena arena, Consumer<MemorySegment> cleanup) Reinterpretsaddrusing targetarenaand invalid input: '{@code cleanupAction) (if any). The returned segment has size {@code layout().byteSize()}'static longsizeof()The size (in bytes) of this structstatic floatwidth(MemorySegment struct) Getter for field:float widthstatic voidwidth(MemorySegment struct, float fieldValue) Setter for field:float widthstatic final ValueLayout.OfFloatLayout for field:float widthstatic final longOffset for field:float widthstatic floatx(MemorySegment struct) Getter for field:float xstatic voidx(MemorySegment struct, float fieldValue) Setter for field:float xstatic final ValueLayout.OfFloatx$layout()Layout for field:float xstatic final longx$offset()Offset for field:float xstatic floaty(MemorySegment struct) Getter for field:float ystatic voidy(MemorySegment struct, float fieldValue) Setter for field:float ystatic final ValueLayout.OfFloaty$layout()Layout for field:float ystatic final longy$offset()Offset for field:float y
-
Method Details
-
layout
The layout of this struct -
x$layout
Layout for field:float x -
x$offset
public static final long x$offset()Offset for field:float x -
x
Getter for field:float x -
x
Setter for field:float x -
y$layout
Layout for field:float y -
y$offset
public static final long y$offset()Offset for field:float y -
y
Getter for field:float y -
y
Setter for field:float y -
width$layout
Layout for field:float width -
width$offset
public static final long width$offset()Offset for field:float width -
width
Getter for field:float width -
width
Setter for field:float width -
height$layout
Layout for field:float height -
height$offset
public static final long height$offset()Offset for field:float height -
height
Getter for field:float height -
height
Setter for field:float height -
asSlice
Obtains a slice ofarrayParamwhich selects the array element atindex. The returned segment has addressarrayParam.address() + index * layout().byteSize() -
sizeof
public static long sizeof()The size (in bytes) of this struct -
allocate
Allocate a segment of sizelayout().byteSize()usingallocator -
allocateArray
Allocate an array of sizeelementCountusingallocator. The returned segment has sizeelementCount * layout().byteSize(). -
reinterpret
public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer<MemorySegment> cleanup) Reinterpretsaddrusing targetarenaand invalid input: '{@code cleanupAction) (if any). The returned segment has size {@code layout().byteSize()}' -
reinterpret
public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer<MemorySegment> cleanup) Reinterpretsaddrusing targetarenaand invalid input: '{@code cleanupAction) (if any). The returned segment has size {@code elementCount * layout().byteSize()}'
-