/* 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 stampNumber = jjtGetParent().getStampNumber();
      int scaleX = jjtGetParent().getScaleX();
      int scaleY = jjtGetParent().getScaleY();
      int stampX = scaleX * jjtGetParent().getStampX();
	int stampY = scaleY * jjtGetParent().getStampY();
  	int xOff = jjtGetParent().getXOff();
    	int yOff = jjtGetParent().getYOff();
    	int xleft = xOff + (jjtGetChild(0).getParam()*scaleX);
    	int ytop = yOff + (jjtGetChild(1).getParam()*scaleY);
    	int xright = xOff + (jjtGetChild(2).getParam()*scaleX);
    	int ybottom = yOff + (jjtGetChild(3).getParam()*scaleY);

      

    	if(xright<xleft)  
    	{
       	int temp = xleft;
       	xleft = xright;
       	xright = temp;         
    	}
    	if(ybottom<ytop)  
    	{
       	int temp = ybottom;
       	ybottom = ytop;
       	ytop = temp;   
    	}
    	float xradius = (float)((xright - xleft)/2);
    	float yradius = (float)((ybottom - ytop)/2);
      for(int k = 0;k<stampNumber;k++)
      { 
    	   	System.out.println("<ellipse fill=\"none\" stroke-width=\"" + linewidth + "\" stroke=\"" + col +"\" cx=\"" + (
               xradius+xleft+(k*stampX)) + "\" cy=\"" + (yradius+ytop+(k*stampY))+ "\" rx=\"" + xradius + "\" ry=\"" + yradius + "\"/>");
  	}
   }
}
