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

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

  public ASTSquare(drawphase3 p, int id) {
    super(p, id);
  }
  
  public String getType()
  {
    return "Square";
  }  

  /*-----------------------------------------------*/
  /* Returns drawn square as 4 lines               */
  /*-----------------------------------------------*/
  public String getString()
  {
    int offsetX = getOffsetX();
    int offsetY = getOffsetY();
    int scaleX = getScaleX();
    int scaleY = getScaleY();
    String colour = getColour();
    int brush = getBrush();
    int repeatX = getRepeatX();
    int repeatY = getRepeatY();

    int xbottom = ((ASTInt) jjtGetChild(1)).val + (((ASTInt) jjtGetChild(2)).val - ((ASTInt) jjtGetChild(0)).val);

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

    return square; 
  }

}
