Package com.raylib
Class Rectangle
java.lang.Object
com.raylib.Rectangle
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal MemorySegment
The native FFI MemorySegment that holds the data this object wraps. -
Constructor Summary
ConstructorsConstructorDescriptionConstruct with auto memory allocator and fields initialized to zero.Rectangle
(float x, float y, float width, float height) Construct with auto memory allocator and fields initialized as specifiedRectangle
(MemorySegment memorySegment) Construct by wrapping around an already allocated MemorySegment, perhaps from another objectRectangle
(SegmentAllocator arena) Construct with your owm memory allocator and fields not initializedRectangle
(SegmentAllocator arena, float x, float y, float width, float height) Construct with your own memory allocator and fields initialized as specified -
Method Summary
Modifier and TypeMethodDescriptionstatic Rectangle
allocateArray
(long elementCount) Allocate an array of Rectanglestatic Rectangle
allocateArray
(long elementCount, SegmentAllocator allocator) Allocate an array of Rectangleboolean
Equality is tested on basis of both wrapper objects must refer to same native memory location to be considered equalgetArrayElement
(int index) float
Rectangle heightfloat
getWidth()
Rectangle widthfloat
getX()
Rectangle top-left corner position xfloat
getY()
Rectangle top-left corner position yint
hashCode()
setHeight
(float value) Rectangle heightsetWidth
(float value) Rectangle widthsetX
(float value) Rectangle top-left corner position xsetY
(float value) Rectangle top-left corner position y
-
Field Details
-
memorySegment
The native FFI MemorySegment that holds the data this object wraps.
-
-
Constructor Details
-
Rectangle
public Rectangle()Construct with auto memory allocator and fields initialized to zero. -
Rectangle
Construct with your owm memory allocator and fields not initialized -
Rectangle
Construct by wrapping around an already allocated MemorySegment, perhaps from another object -
Rectangle
public Rectangle(float x, float y, float width, float height) Construct with auto memory allocator and fields initialized as specified- Parameters:
x
- Rectangle top-left corner position xy
- Rectangle top-left corner position ywidth
- Rectangle widthheight
- Rectangle height
-
Rectangle
Construct with your own memory allocator and fields initialized as specified- Parameters:
x
- Rectangle top-left corner position xy
- Rectangle top-left corner position ywidth
- Rectangle widthheight
- Rectangle height
-
-
Method Details
-
equals
-
hashCode
-
getArrayElement
-
allocateArray
Allocate an array of Rectangle -
allocateArray
Allocate an array of Rectangle -
getX
public float getX()Rectangle top-left corner position x -
setX
Rectangle top-left corner position x -
getY
public float getY()Rectangle top-left corner position y -
setY
Rectangle top-left corner position y -
getWidth
public float getWidth()Rectangle width -
setWidth
Rectangle width -
getHeight
public float getHeight()Rectangle height -
setHeight
Rectangle height
-