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

public class ASTsquare extends SimpleNode {
  public ASTsquare(int id) {
    super(id);
  }

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

  

  public void getSVG()
  {
      String col = jjtGetParent().getColour();
      int linewidth = jjtGetParent().getLineWidth();
	int stampNumber = jjtGetParent().getStampNumber();
      int xOff = jjtGetParent().getXOff();
      int yOff = jjtGetParent().getYOff();
      int scaleX = jjtGetParent().getScaleX();
      int scaleY = jjtGetParent().getScaleY();
      int stampX = scaleX * jjtGetParent().getStampX();
	int stampY = scaleY * jjtGetParent().getStampY();
      int xleft = jjtGetChild(0).getParam();
      int ytop = jjtGetChild(1).getParam();
	int xright = jjtGetChild(2).getParam();
      int ybottom = (xright-xleft)+ytop;
      xleft = xOff + (scaleX * xleft);
      ytop = yOff + (scaleY * ytop);
      xright = xOff + (scaleX * xright);
      ybottom = yOff + (scaleY * ybottom);
      
      float halflinewidth = (float)(jjtGetParent().jjtGetParent().getLineWidth())/2;

      for(int k = 0;k<stampNumber;k++)
      { 
       
  
        if(scaleX<0)
        {
          halflinewidth = 0-halflinewidth;
        } 
        System.out.println("<line stroke-width=\"" + linewidth + "\" stroke=\"" + col +"\" x1=\"" + (xleft-halflinewidth+(k*stampX))
           + "\" y1=\"" + (ytop+(k*stampY)) + "\" x2=\"" + (xright+halflinewidth+(k*stampX)) + "\" y2=\"" + (ytop+(k*stampY)) + "\"/>");
        System.out.println("<line stroke-width=\"" + linewidth + "\" stroke=\"" + col +"\" x1=\"" + (xright+halflinewidth+(k*stampX))
           + "\" y1=\"" + (ybottom+(k*stampY)) + "\" x2=\"" + (xleft-halflinewidth+(k*stampX)) + "\" y2=\"" + (ybottom+(k*stampY)) + "\"/>");

        

        if(linewidth<0)
        {
          halflinewidth = 0-halflinewidth;
        }
        if(scaleY<0)
        {
          halflinewidth = 0-halflinewidth;
        }
          System.out.println("<line stroke-width=\"" + linewidth + "\" stroke=\"" + col +"\" x1=\"" + (xleft-halflinewidth+(k*stampX))
            + "\" y1=\"" + (ybottom+halflinewidth+(k*stampY)) + "\" x2=\"" + (xleft-halflinewidth+(k*stampX)) + "\" y2=\"" + (ytop-halflinewidth+(k*stampY)) + "\"/>");
          System.out.println("<line stroke-width=\"" + linewidth + "\" stroke=\"" + col +"\" x1=\"" + (xright+halflinewidth+(k*stampX))
            + "\" y1=\"" + (ytop-halflinewidth+(k*stampY)) + "\" x2=\"" + (xright+halflinewidth+(k*stampX)) + "\" y2=\"" + (ybottom+halflinewidth+(k*stampY)) + "\"/>");
        
        

        if(linewidth<0) 
        {
          halflinewidth = 0-halflinewidth;
        }
     }
  }
}
