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

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

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

  public String getType()
  {
    return "Rectangle";
  }

  /*-----------------------------------------------*/
  /* Returns rectangle as four lines               */
  /*-----------------------------------------------*/  
  public String getString()
  {
    String colour = getColour();
    int brush = getBrush();
    int offsetX = getOffsetX();
    int offsetY = getOffsetY();

    String square = "{\n" + 
    formatLine(((ASTInt) jjtGetChild(0)).val,((ASTInt) jjtGetChild(3)).val,((ASTInt) jjtGetChild(0)).val,((ASTInt) jjtGetChild(1)).val,colour,brush,offsetX,offsetY)+"\n"+
    formatLine(((ASTInt) jjtGetChild(0)).val,((ASTInt) jjtGetChild(1)).val,((ASTInt) jjtGetChild(2)).val,((ASTInt) jjtGetChild(1)).val,colour,brush,offsetX,offsetY)+"\n"+
    formatLine(((ASTInt) jjtGetChild(2)).val,((ASTInt) jjtGetChild(1)).val,((ASTInt) jjtGetChild(2)).val,((ASTInt) jjtGetChild(3)).val,colour,brush,offsetX,offsetY)+"\n"+
    formatLine(((ASTInt) jjtGetChild(2)).val,((ASTInt) jjtGetChild(3)).val,((ASTInt) jjtGetChild(0)).val,((ASTInt) jjtGetChild(3)).val,colour,brush,offsetX,offsetY)+
    "\n}";

    return square; 
  }
}
