public interface Shape
Modifier and Type | Method and Description |
---|---|
boolean |
contains(double x,
double y)
Test if the shape contains the point (x,y)
|
boolean |
contains(double x,
double y,
double w,
double h)
Test if the shape contains the rectangle with top left at (x,y), width w and height h.
|
boolean |
contains(Point2D p)
Test if the shape contains the Point2D
|
boolean |
contains(Rectangle2D r)
Test if the shape contains the Rectangle2D
|
RectangleInt32 |
getBounds()
Get the bounding Rectangle for the shape
|
Rectangle2D |
getBounds2D()
Get the bounding Rectangle2D for the shape
|
boolean |
intersects(double x,
double y,
double w,
double h)
Test if the shape intersects the rectangle with top left at (x,y), width w and height h.
|
boolean |
intersects(Rectangle2D r)
Test if the shape intersects the Rectangle2D r
|
RectangleInt32 getBounds()
Rectangle2D getBounds2D()
boolean contains(double x, double y)
x
- the x co-ordinate of the pointy
- the y co-ordinate of the pointboolean contains(Point2D p)
p
- the Point2Dboolean intersects(double x, double y, double w, double h)
x
- the x-coordinate of the top left point of the rectangley
- the y-coordinate of the top left point of the rectanglew
- the width of the rectangleh
- the height of the rectangleboolean intersects(Rectangle2D r)
r
- the Recangle2Dboolean contains(double x, double y, double w, double h)
x
- the x-coordinate of the top left point of the rectangley
- the y-coordinate of the top left point of the rectanglew
- the width of the rectangleh
- the height of the rectangleboolean contains(Rectangle2D r)
r
- the Rectangle2D