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

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

  	public ASTRectangle(drawphase1 p, int id) 
  	{
    	super(p, id);
  	}
  	
  	/*************************************************
	
	Method implemented as part of Node interface 
	
	*************************************************/

  	public void generate()
  	{
    }
    
    /*************************************************
	
	Method to generate SVG code for a rectangle and return
	the four lines in a string
	
	*************************************************/
  
  	public String generateSVG()
  	{
  		String rectangle, right, left, top, bottom;
  		
  		right = ("<line x1=\"" + ((ASTInt) jjtGetChild(0)).val +
        	"\" y1=\"" + ((ASTInt) jjtGetChild(1)).val +
        	"\" x2=\"" + ((ASTInt) jjtGetChild(0)).val +
        	"\" y2=\"" + ((ASTInt) jjtGetChild(3)).val +
        	"\" stroke=\"black\" stroke-width=\"1\"/>");
        	
        left = ("<line x1=\"" + ((ASTInt) jjtGetChild(2)).val +
        	"\" y1=\"" + ((ASTInt) jjtGetChild(1)).val +
        	"\" x2=\"" + ((ASTInt) jjtGetChild(2)).val +
        	"\" y2=\"" + ((ASTInt) jjtGetChild(3)).val +
        	"\" stroke=\"black\" stroke-width=\"1\"/>");
        	
        top = ("<line x1=\"" + ((ASTInt) jjtGetChild(0)).val +
        	"\" y1=\"" + ((ASTInt) jjtGetChild(1)).val +
        	"\" x2=\"" + ((ASTInt) jjtGetChild(2)).val +
        	"\" y2=\"" + ((ASTInt) jjtGetChild(1)).val +
        	"\" stroke=\"black\" stroke-width=\"1\"/>");
        	
        bottom = ("<line x1=\"" + ((ASTInt) jjtGetChild(0)).val +
        	"\" y1=\"" + ((ASTInt) jjtGetChild(3)).val +
        	"\" x2=\"" + ((ASTInt) jjtGetChild(2)).val +
        	"\" y2=\"" + ((ASTInt) jjtGetChild(3)).val +
        	"\" stroke=\"black\" stroke-width=\"1\"/>");
        	
        rectangle = right + left + top + bottom;
        
        return rectangle;
  	}
  

}
