Ejemplo n.º 1
0
  /** Convert array of polygon GeoPoints to an Area object */
  private Area getArea(GeoPoint[] points) {

    double[] coords = new double[2];
    GeneralPathClipped gp = new GeneralPathClipped(ev);

    // first point
    points[0].getInhomCoords(coords);
    gp.moveTo(coords[0], coords[1]);

    for (int i = 1; i < points.length; i++) {
      points[i].getInhomCoords(coords);
      gp.lineTo(coords[0], coords[1]);
    }
    gp.closePath();

    return new Area(gp);
  }