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

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

  public ASTTriangle(drawphase3 p, int id) {
    super(p, id);
  }

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

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

    String triangle = "{";
    int noChilds = jjtGetNumChildren();

    for(int i=0; i < noChilds-2; i++) 
    {
      triangle = triangle + "\n" +
      formatLine(((ASTInt) jjtGetChild(i)).val,((ASTInt) jjtGetChild(i+1)).val,((ASTInt) jjtGetChild(i+2)).val,((ASTInt) jjtGetChild(i+3)).val,colour,brush,offsetX,offsetY,scaleX,scaleY,repeatX,repeatY);
      i = i +1;
    }

    triangle = triangle + "\n" +
    formatLine(((ASTInt) jjtGetChild(noChilds-2)).val,((ASTInt) jjtGetChild(noChilds-1)).val,((ASTInt) jjtGetChild(0)).val,((ASTInt) jjtGetChild(1)).val,colour,brush,offsetX,offsetY,scaleX,scaleY,repeatX,repeatY) + 
    "\n}";

    return triangle; 
  }

}
