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

  public class ASTcircle extends SimpleNode {

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

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

  public void getSVG()
  {
      int linewidth = jjtGetParent().getLineWidth();
      String col = jjtGetParent().getColour();
      int xOff = jjtGetParent().getXOff();
      int yOff = jjtGetParent().getYOff();
      int xleft = jjtGetChild(0).getParam();
      int ytop = jjtGetChild(1).getParam();
      int xright = jjtGetChild(2).getParam();
      int ybottom = xright-xleft+ytop;

      xleft = xOff + xleft;
      ytop = yOff + ytop;
      xright = xOff + xright;
      ybottom = yOff + ybottom;

      float xradius = ((float)((xright-xleft)/2));
      float yradius = ((float)((ybottom-ytop)/2));

      System.out.println("<ellipse fill=\"none\" stroke-width=\"" + linewidth + "\" stroke=\""
               + col +"\" cx=\"" + (xradius+xleft) + "\" cy=\"" + (yradius + ytop) + "\" rx=\""
                     + xradius + "\" ry=\"" + yradius + "\"/>");

  }

}
