pythagoras.i

## Interface IShape

• ### Method Summary

All Methods
Modifier and Type Method and Description
`Rectangle` `bounds()`
Returns a copy of the bounding rectangle for this shape.
`Rectangle` `bounds(Rectangle target)`
Initializes the supplied rectangle with this shape's bounding rectangle.
`boolean` ```contains(int x, int y)```
Returns true if this shape contains the specified point.
`boolean` ```contains(int x, int y, int width, int height)```
Returns true if this shape completely contains the specified rectangle.
`boolean` `contains(IPoint point)`
Returns true if this shape contains the supplied point.
`boolean` `contains(IRectangle r)`
Returns true if this shape completely contains the supplied rectangle.
`boolean` ```intersects(int x, int y, int width, int height)```
Returns true if this shape intersects the specified rectangle.
`boolean` `intersects(IRectangle r)`
Returns true if this shape intersects the supplied rectangle.
`boolean` `isEmpty()`
Returns true if this shape encloses no area.
• ### Method Detail

• #### isEmpty

`boolean isEmpty()`
Returns true if this shape encloses no area.
• #### contains

```boolean contains(int x,
int y)```
Returns true if this shape contains the specified point.
• #### contains

`boolean contains(IPoint point)`
Returns true if this shape contains the supplied point.
• #### contains

```boolean contains(int x,
int y,
int width,
int height)```
Returns true if this shape completely contains the specified rectangle.
• #### contains

`boolean contains(IRectangle r)`
Returns true if this shape completely contains the supplied rectangle.
• #### intersects

```boolean intersects(int x,
int y,
int width,
int height)```
Returns true if this shape intersects the specified rectangle.
• #### intersects

`boolean intersects(IRectangle r)`
Returns true if this shape intersects the supplied rectangle.
• #### bounds

`Rectangle bounds()`
Returns a copy of the bounding rectangle for this shape.
• #### bounds

`Rectangle bounds(Rectangle target)`
Initializes the supplied rectangle with this shape's bounding rectangle.
Returns:
the supplied rectangle.