Polygon
class encapsulates a description of a closed, two-dimensional region within a coordinate space. This region is bounded by an arbitrary number of line segments, each of which is one side of the polygon. Internally, a polygon comprises of a list of {@code (x,y)}coordinate pairs, where each pair defines a vertex of the polygon, and two successive pairs are the endpoints of a line that is a side of the polygon. The first and final pairs of {@code (x,y)} points are joined by a line segment that closes the polygon. This Polygon
is defined with an even-odd winding rule. See {@link java.awt.geom.PathIterator#WIND_EVEN_ODD WIND_EVEN_ODD}for a definition of the even-odd winding rule. This class's hit-testing methods, which include the contains
, intersects
and inside
methods, use the insideness definition described in the {@link Shape} class comments.
@version 1.26, 07/24/98
@author Sami Shaio
@see Shape
@author Herb Jellinek
@since 1.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|