Polygon.contains
Class Overview | Class Members |
This Package |
All Packages
public boolean contains( Point p )
Parameters
- p
- the point to be tested
Description
Determines whether the specified point is inside the Polygon.
Uses an even-odd insideness rule (also known as an alternating
rule).
public boolean contains( int x,
int y )
Parameters
- x
- the x coordinate of the point to be tested.
- y
- the y coordinate of the point to be tested.
Returns
true if the point (x, y)
is contained by this polygon;
false otherwise.
Description
Determines whether the specified point is contained by this polygon.
(The contains method is based on code by
Hanpeter van Vliet [hvvliet@inter.nl.net].)