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

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

  public ASTellipse(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 = xOff + jjtGetChild(0).getParam();
    	int ytop = yOff + jjtGetChild(1).getParam();
    	int xright = xOff + jjtGetChild(2).getParam();
    	int ybottom = yOff + jjtGetChild(3).getParam();

    	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 + "\"/>");

  }
}
