Polygon
Class Polygon
- java.lang.Object
-
- java.awt.Polygon
- All Implemented Interfaces:
- Shape, Serializable
public class Polygon extends Object implements Shape, Serializable
The 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 (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 (x,y