public interface Rectangle
Modifier and Type | Method and Description |
---|---|
boolean |
contains(int x,
int y)
Check if the rectangle contains the point.
|
boolean |
contains(Rectangle rectangle)
Check if the rectangle contains the other.
|
double |
getHeight()
Get the width.
|
double |
getMaxX()
Get the max x location.
|
double |
getMaxY()
Get the max y location.
|
double |
getMinX()
Get the min x location.
|
double |
getMinY()
Get the min y location.
|
double |
getWidth()
Get the width.
|
double |
getX()
Get the horizontal location.
|
double |
getY()
Get the vertical location.
|
boolean |
intersects(Rectangle rectangle)
Check if the rectangle intersects the other.
|
void |
set(double x,
double y,
double w,
double h)
Sets the location and size.
|
boolean intersects(Rectangle rectangle)
rectangle
- The rectangle to test with.true
if intersect, false
else.boolean contains(Rectangle rectangle)
rectangle
- The rectangle to test with.true
if contains, false
else.boolean contains(int x, int y)
x
- The horizontal location.y
- The vertical location.true
if contains, false
else.void set(double x, double y, double w, double h)
x
- The horizontal location.y
- The vertical location.w
- The rectangle width.h
- The rectangle height.double getX()
double getY()
double getMinX()
double getMinY()
double getMaxX()
double getMaxY()
double getWidth()
double getHeight()