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()
float
height()
Rectangle heightheight
(float value) Rectangle heightvoid
setHeight
(float value) Rectangle heightvoid
setWidth
(float value) Rectangle widthvoid
setX
(float value) Rectangle top-left corner position xvoid
setY
(float value) Rectangle top-left corner position yfloat
width()
Rectangle widthwidth
(float value) Rectangle widthfloat
x()
Rectangle top-left corner position xx
(float value) Rectangle top-left corner position xfloat
y()
Rectangle top-left corner position yy
(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
public void setX(float value) Rectangle top-left corner position x -
x
public float x()Rectangle top-left corner position x -
x
Rectangle top-left corner position x -
getY
public float getY()Rectangle top-left corner position y -
setY
public void setY(float value) Rectangle top-left corner position y -
y
public float y()Rectangle top-left corner position y -
y
Rectangle top-left corner position y -
getWidth
public float getWidth()Rectangle width -
setWidth
public void setWidth(float value) Rectangle width -
width
public float width()Rectangle width -
width
Rectangle width -
getHeight
public float getHeight()Rectangle height -
setHeight
public void setHeight(float value) Rectangle height -
height
public float height()Rectangle height -
height
Rectangle height
-