/* 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);
  }
 public void generate()
  {
 	int xl=((ASTInt) jjtGetChild(0)).val;
	int yt=((ASTInt) jjtGetChild(1)).val;
	int xr=((ASTInt) jjtGetChild(2)).val;
	int yb;

	int rx=(xl-xr)/2;
	int ry=rx;
	int cx=rx+xl;
	int cy=ry+yt;

	if (cy<0)
		cy=cy*-1;
	if (rx<0)
		rx=rx*-1;
	if (ry<0)
		ry=ry*-1;
	if (cx<0)
		cx=cx*-1;


    System.out.println("<ellipse cx=\"" + cx +
        "\" cy=\"" + cy +
        "\" rx=\"" + rx +
        "\" ry=\"" + ry+
        "\" fill=\"white\" stroke=\"black\" stroke-width=\"1\"/>");
  }





}
