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

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

  	public ASTCircle(drawphase1 p, int id) 
  	{
    	super(p, id);
  	}
  	
  	/*************************************************
	
	generateSVG() method to create the SVG code for an
	a circle, converting it to ellipse.
	
	*************************************************/
  	  
  	public String generateSVG()
  	{
  		String temp;
  		int width = (((ASTInt) jjtGetChild(2)).val) - (((ASTInt) jjtGetChild(0)).val);
  		int height = (((ASTInt) jjtGetChild(2)).val) - (((ASTInt) jjtGetChild(1)).val);
  		
		temp = ("<ellipse cx=\"" + ((((ASTInt) jjtGetChild(0)).val) + (width/2)) +
        	"\" cy=\"" + ((((ASTInt) jjtGetChild(1)).val) + (height/2)) + 
            "\" rx=\"" + (width / 2) +
            "\" ry=\"" + (height / 2) + 
            "\" fill=\"none\" stroke=\"black\" stroke-width=\"1\"/>");

  		return temp;
  
  	}	
  	
  	/*************************************************
	
	Method implemented as part of Node interface 
	
	*************************************************/
	
  	public void generate()
  	{
    }

}

