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

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

  public ASTRectangle(drawphase1 p, int id) {
    super(p, id);
  }


/****************************************************
 Generates the svg code for a rectangle, by taking in 
 the 4 children of the Rectangle node, and storing 
 them as the x, y, width and height values.
****************************************************/

  public void generate()
  {
    int width = ((ASTInt) jjtGetChild(2)).val - ((ASTInt) jjtGetChild(0)).val;
    int height = ((ASTInt) jjtGetChild(3)).val - ((ASTInt) jjtGetChild(1)).val;
   
    System.out.println
	  ("<rect x=\"" + ((ASTInt) jjtGetChild(0)).val +
        "\" y=\"" + ((ASTInt) jjtGetChild(1)).val +
        "\" width=\"" + width +
        "\" height=\"" + height + 
        "\" fill=\"none\" stroke=\"black\" stroke-width=\"1\" />");
  }


}
