/* 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 xOff = jjtGetParent().getXOff();
      int yOff = jjtGetParent().getYOff();
      int xleft = jjtGetChild(0).getParam();
      int ytop = jjtGetChild(1).getParam();
	int xright = jjtGetChild(2).getParam();
      int ybottom = (xright-xleft)+ytop;
      xleft = xOff + xleft;
      ytop = yOff + ytop;
      xright = xOff + xright;
      ybottom = yOff + ybottom;
      
      float halflinewidth = (float)(jjtGetParent().jjtGetParent().getLineWidth())/2;

      System.out.println("<line stroke-width=\"" + linewidth + "\" stroke=\"" + col +"\" x1=\"" + (xleft-halflinewidth)
           + "\" y1=\"" + (ytop-halflinewidth) + "\" x2=\"" + (xright+halflinewidth) + "\" y2=\"" + (ytop-halflinewidth) + "\"/>");
      System.out.println("<line stroke-width=\"" + linewidth + "\" stroke=\"" + col +"\" x1=\"" + (xright+halflinewidth)
           + "\" y1=\"" + (ybottom+halflinewidth) + "\" x2=\"" + (xleft-halflinewidth) + "\" y2=\"" + (ybottom+halflinewidth) + "\"/>");
      System.out.println("<line stroke-width=\"" + linewidth + "\" stroke=\"" + col +"\" x1=\"" + (xleft-halflinewidth)
           + "\" y1=\"" + (ybottom+halflinewidth) + "\" x2=\"" + (xleft-halflinewidth) + "\" y2=\"" + (ytop-halflinewidth) + "\"/>");
      System.out.println("<line stroke-width=\"" + linewidth + "\" stroke=\"" + col +"\" x1=\"" + (xright+halflinewidth)
           + "\" y1=\"" + (ytop-halflinewidth) + "\" x2=\"" + (xright+halflinewidth) + "\" y2=\"" + (ybottom+halflinewidth) + "\"/>");
     
  }
}
