/**
   * Sets the points in the polygon.
   *
   * @param points The points in the polygon.
   * @param points1 The points in the polygon.
   * @param points2 The points in the polygon.
   * @param maskList The points in the polygon.
   */
  public void setPoints(
      List<Point2D.Double> points,
      List<Point2D.Double> points1,
      List<Point2D.Double> points2,
      List<Integer> maskList) {
    if (isReadOnly()) throw new IllegalArgumentException("Shape ReadOnly");
    Polygon shape = (Polygon) asIObject();
    if (shape == null) throw new IllegalArgumentException("No shape specified.");

    String pointsValues = toPoints(points.toArray(new Point2D.Double[points.size()]));
    String points1Values = toPoints(points1.toArray(new Point2D.Double[points1.size()]));
    String points2Values = toPoints(points2.toArray(new Point2D.Double[points2.size()]));
    String maskValues = "";
    for (int i = 0; i < maskList.size() - 1; i++) maskValues = maskValues + maskList.get(i) + ",";
    if (maskList.size() != 0) maskValues = maskValues + maskList.get(maskList.size() - 1) + "";
    String pts = "points[" + pointsValues + "] ";
    pts = pts + "points1[" + points1Values + "] ";
    pts = pts + "points2[" + points2Values + "] ";
    pts = pts + "mask[" + maskValues + "] ";

    shape.setPoints(rtypes.rstring(pts));
  }
 /**
  * Returns the text of the shape.
  *
  * @return See above.
  */
 public String getText() {
   Polygon shape = (Polygon) asIObject();
   RString value = shape.getTextValue();
   if (value == null) return "";
   return value.getValue();
 }
 /**
  * Sets the text of the shape.
  *
  * @param text See above.
  */
 public void setText(String text) {
   if (isReadOnly()) throw new IllegalArgumentException("Shape ReadOnly");
   Polygon shape = (Polygon) asIObject();
   if (shape == null) throw new IllegalArgumentException("No shape specified.");
   shape.setTextValue(rtypes.rstring(text));
 }