/**
   * Utility method for creating an ExtendedGeneralPath.
   *
   * @param text The text representation of the path specification.
   * @param wr The winding rule to use for creating the path.
   */
  public static Shape createShape(String text, int wr) throws ParseException {
    AWTPolygonProducer ph = new AWTPolygonProducer();

    ph.setWindingRule(wr);
    PointsParser p = new PointsParser(ph);
    p.parse(text);

    return ph.getShape();
  }