/* Generated By:JJTree: Do not edit this line. ASTpolygon.java */

public class ASTpolygon extends SimpleNode {

  protected int j;

  public ASTpolygon(int id) {
    super(id);
  }

  public ASTpolygon(S p, int id) {
    super(p, id);
  }

  public void getSVG()
  { 
    int linewidth = jjtGetParent().getLineWidth();
    String col = jjtGetParent().getColour();
    int xOff = jjtGetParent().getXOff();
    int yOff = jjtGetParent().getYOff();
    j = jjtGetNumChildren();
    int[] childArray = new int[j];
  

    for(int k = 0;k<j-3;k=k+2)
    {
   	 System.out.println("<line stroke-width=\"" + linewidth + "\" stroke=\"" + col +"\" x1=\"" + (jjtGetChild(k).getParam()+xOff) + "\" y1=\"" + 
          (jjtGetChild(k+1).getParam()+yOff) + "\" x2=\"" + (jjtGetChild(k+2).getParam()+xOff) 
          + "\" y2=\"" + (jjtGetChild(k+3).getParam()+yOff) + "\"/>");
    }
 	
    System.out.println("<line stroke-width=\"" + linewidth + "\" stroke=\"" + col +"\" x1=\"" + (jjtGetChild(0).getParam()+xOff) + "\" y1=\"" + (jjtGetChild(1).getParam()+yOff) + 
                      "\" x2=\"" + (jjtGetChild(j-2).getParam()+xOff) + "\" y2=\"" + (jjtGetChild(j-1).getParam()+yOff) + "\"/>");
  }
}
