This method draws the polygon defined by nPoint
line segments, where the first nPoint - 1
line segments are line segments from (xPoints[i - 1], yPoints[i - 1])
to (xPoints[i], yPoints[i])
, for 1 ≤ i ≤ nPoints
. The figure is automatically closed by drawing a line connecting the final point to the first point, if those points are different.
The area inside the polygon is defined using an even-odd fill rule, also known as the alternating rule.
@param xPoints a an array of x
coordinates.
@param yPoints a an array of y
coordinates.
@param nPoints a the total number of points.
@see java.awt.Graphics#drawPolygon(int[],int[],int)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|