public interface IRectangle extends IDimension, ILocation
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(ILocation location)
Checks whether the point with the given location is inside the rectangle.
|
boolean |
contains(int x,
int y)
Checks whether the point with (x,y) is inside the rectangle.
|
IRectangle |
getRectangleCopy() |
void |
setRectangle(int x,
int y,
int width,
int height)
Sets the location and dimension of the rectangle.
|
void |
setRectangle(IRectangle rectangle)
Sets the location and dimension of the rectangle to the values of the
given rectangle.
|
getHeight, getWidth, setHeight, setWidthIRectangle getRectangleCopy()
void setRectangle(int x,
int y,
int width,
int height)
x - the x coordinate of the rectangley - the y coordinate of the rectanglewidth - the width of the rectangleheight - the height of the rectanglevoid setRectangle(IRectangle rectangle)
rectangle - The rectangle which contains new location and dimension.boolean contains(int x,
int y)
x - the x coordinate of the point to be testedy - the y coordinate of the point to be testedboolean contains(ILocation location)
location - the location of the point to be tested