Example #1
0
 /**
  * Draws a closed polygon defined by
  * arrays of <i>x</i> and <i>y</i> coordinates.
  * Each pair of (<i>x</i>,&nbsp;<i>y</i>) coordinates defines a point.
  * <p>
  * This method Draws the polygon defined by <code>nPoint</code> line
  * segments, where the first <code>nPoint&nbsp;-&nbsp;1</code>
  * line segments are line segments from
  * <code>(xPoints[i&nbsp;-&nbsp;1],&nbsp;yPoints[i&nbsp;-&nbsp;1])</code>
  * to <code>(xPoints[i],&nbsp;yPoints[i])</code>, for
  * 1&nbsp;&le;&nbsp;<i>i</i>&nbsp;&le;&nbsp;<code>nPoints</code>.
  * The figure is automatically closed by Drawing a line connecting
  * the point to the first point, if those points are different.
  * @param        xPoints   a an array of <code>x</code> coordinates.
  * @param        yPoints   a an array of <code>y</code> coordinates.
  * @param        nPoints   a the total number of points.
  * @see          java.awt.Graphics#FillPolygon(int[],int[],int)
  * @see          java.awt.Graphics#drawPolyline
  */
 public void DrawPolygon(int[] xPoints, int[] yPoints,
                         int nPoints){
     java.awt.Polygon polygon = new java.awt.Polygon(xPoints, yPoints, nPoints);
     Draw(polygon);
 }
Example #2
0
 public override void fillPolygon(java.awt.Polygon polygon)
 {
     fillPolygon(polygon.xpoints, polygon.ypoints, polygon.npoints);
 }
Example #3
0
 /**
  * Fills a closed polygon defined by
  * arrays of <i>x</i> and <i>y</i> coordinates.
  * <p>
  * This method Draws the polygon defined by <code>nPoint</code> line
  * segments, where the first <code>nPoint&nbsp;-&nbsp;1</code>
  * line segments are line segments from
  * <code>(xPoints[i&nbsp;-&nbsp;1],&nbsp;yPoints[i&nbsp;-&nbsp;1])</code>
  * to <code>(xPoints[i],&nbsp;yPoints[i])</code>, for
  * 1&nbsp;&le;&nbsp;<i>i</i>&nbsp;&le;&nbsp;<code>nPoints</code>.
  * The figure is automatically closed by Drawing a line connecting
  * the point to the first point, if those points are different.
  * <p>
  * 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 <code>x</code> coordinates.
  * @param        yPoints   a an array of <code>y</code> coordinates.
  * @param        nPoints   a the total number of points.
  * @see          java.awt.Graphics#drawPolygon(int[], int[], int)
  */
 public void FillPolygon(int[] xPoints, int[] yPoints,
                         int nPoints){
     java.awt.Polygon polygon = new java.awt.Polygon(xPoints, yPoints, nPoints);
     Fill(polygon);
 }
Example #4
0
 public override void drawPolygon(java.awt.Polygon polygon)
 {
     drawPolygon(polygon.xpoints, polygon.ypoints, polygon.npoints);
 }