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

public class ASTstate extends SimpleNode {

  
  protected int j, offset, repeat,linewidth = 1,
   xOff = 0,yOff= 0,scaleX = 1,scaleY = 1,stampX=0,stampY=0,stampNumber = 1;
  protected String colour = "black";
  protected boolean firsttimeYScale=true,firsttimeXScale=true,firsttimeY=true,
          firsttimeX=true,firsttimeWidth=true,firsttimecol=true,firststamp=true;

  public ASTstate(int id) {
    super(id);
  }

  public ASTstate(S p, int id) {
    super(p, id);
  }

  public void getSVG()
  {   
    j = jjtGetNumChildren();
        
    

    setYOff(1);
    setXOff(1);
    setScaleX(1);
    setScaleY(1);
    setLineWidth(1); 
    setStampX(1);
    setStampY(1);
    setStampNumber(1);
    setColour("nocolour");
    firststamp=false;
 
    for(int i=0;i<j-1;i++)
    {
      jjtGetChild(i).getSVG();
    }    
    jjtGetChild(j-1).getSVG();
  }

  public void setYOff(int i)
  {
     if(firsttimeY)
     {
       yOff = jjtGetParent().getYOff();
       firsttimeY = false;
     }
     else
     {
       yOff = yOff + i;
     }
  }

  public void setXOff(int i)
  {
     if(firsttimeX)
     {
       xOff = jjtGetParent().getXOff();
       firsttimeX = false;
     }
     else
     {
       xOff = xOff + i;
     }
  }
  public int getYOff()
  {
    return yOff;
  }
  public int getXOff()
  {
    return xOff;
  }

  

  public void setScaleX(int i)
  {
   if(firsttimeXScale)
   {
     scaleX = jjtGetParent().getScaleX();
     firsttimeXScale = false;
   }
   else
   {
     scaleX = scaleX * i;
   }
  }

  public void setScaleY(int i)
  {
   if(firsttimeYScale)
   {
     scaleY = jjtGetParent().getScaleY();
     firsttimeYScale = false;
   }
   else
   {
     scaleY = scaleY * i;
   }
  }


  public int getScaleX()
  {
    return scaleX;
  }

  public int getScaleY()
  {
    return scaleY;
  }

  public void setStampX(int i)
  {
     if(firststamp)
     {
       stampX = jjtGetParent().getStampX();
     }
     else
     {
       stampX = i;
     }
  }

  public void setStampY(int i)
  {
     if(firststamp)
     {
       stampY = jjtGetParent().getStampY();
     }
     else
     {
       stampY = i;
     }
  }

  public void setStampNumber(int i)
  {
     if(firststamp)
     {
       stampNumber = jjtGetParent().getStampNumber();
     }
     else
     {
       stampNumber = i;
     }
  }

  public int getStampX()
  {
    return stampX;
  }

  public int getStampY()
  {
    return stampY;
  }

  public int getStampNumber()
  {
    return stampNumber;
  }
  
  public void setLineWidth(int i)
  {
   if(firsttimeWidth)
   {
     linewidth = jjtGetParent().getLineWidth();
     firsttimeWidth = false;
   }
   else
   {
     linewidth = i;
   }
  }

  public int getLineWidth()
  {
    return linewidth;
  }

  public void setColour(String i)
  {
   if(firsttimecol)
   {
     colour = jjtGetParent().getColour();
     firsttimecol = false;
   }
   else
   {
     colour = i;
   }
  }

  public String getColour()
  {
    return colour;
  }
}
