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

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

  public ASTCircle(drawphase1 p, int id) {
    super(p, id);
  }


/****************************************************
 The values inputted needed to match the correct
 syntax of the svg language. It calculates each of 
 these values and prints them out along with the 
 correct svg code.
****************************************************/

  public void generate()
  {
    int cx, cy, r;
    r = (((ASTInt) jjtGetChild(2)).val - ((ASTInt) jjtGetChild(0)).val)/2;
    cx = ((ASTInt) jjtGetChild(0)).val + r;
    cy = ((ASTInt) jjtGetChild(1)).val + r;
   
    System.out.println
	  ("<ellipse cx=\"" + cx +
        "\" cy=\"" + cy +
        "\" rx=\"" + r + 
	  "\" ry=\"" + r + 
        "\" fill=\"none\" stroke=\"black\" stroke-width=\"1\"/>");
  }

}