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

public class ASTPolygon extends SimpleNode
{
	/*************************************************

					Constructors
	
	*************************************************/
	
	public ASTPolygon(int id) 
	{
    	super(id);
  	}

  	public ASTPolygon(drawphase3 p, int id) 
  	{
    	super(p, id);
  	}
  	
  	/*************************************************

	Returns a string containing the SVG code for the
	polygon
	
	*************************************************/
    
  	public String generateSVG()
  	{
  		String temp = "";
  		int childSize = sizeOfChild(), brushSize = 1, offsetX = 0, offsetY = 0, 
  			scaleX = 1, scaleY = 1, repeatX = 0, repeatY = 0, noRepeat = 1;
  		
  		String colour="black";
  		
  		/*************************************************

		Checks if parent type is null
	
		*************************************************/
  		
  		if(!(jjtGetParent().getParentType() == null))
        {
        
  			if(jjtGetParent().getParentType().equals("brush"))
  			{
  				brushSize = jjtGetParent().getBrush();
  			}
  		
  			if(jjtGetParent().getParentType().equals("colour"))
  			{
  				colour = jjtGetParent().getColour();
  			}
  		
  			if(jjtGetParent().getParentType().equals("offset"))
  			{
  				offsetX = jjtGetParent().getOffsetX();
  				offsetY = jjtGetParent().getOffsetY();
  				
  				for(int i = 0; i < sizeOfChild()-2; i++)
   				{
   					temp = temp + ("<line");
   					temp = temp + (" x1=\"" + (((ASTInt) jjtGetChild(i)).val + offsetX) + "\"");
		    		temp = temp + (" y1=\"" + (((ASTInt) jjtGetChild(i+1)).val + offsetY) + "\"");
   					temp = temp + (" x2=\"" + (((ASTInt) jjtGetChild(i+2)).val + offsetX) + "\"");
		   			temp = temp + (" y2=\"" + (((ASTInt) jjtGetChild(i+3)).val + offsetY) + "\"");
   					temp = temp + (" stroke=\"" + colour + "\" stroke-width=\""+brushSize+"\"/>\n");
   					i = i+1;
   				}

    	
    			temp = temp + ("<line");
		    	temp = temp + (" x1=\"" + (((ASTInt) jjtGetChild(childSize-2)).val + offsetX) + "\"");
    			temp = temp + (" y1=\"" + (((ASTInt) jjtGetChild(childSize-1)).val + offsetY) + "\"");
		    	temp = temp + (" x2=\"" + (((ASTInt) jjtGetChild(0)).val + offsetX) + "\"");
    			temp = temp + (" y2=\"" + (((ASTInt) jjtGetChild(1)).val + offsetY) + "\"");
		    	temp = temp + (" stroke=\"" + colour + "\" stroke-width=\""+brushSize+"\"/>");
  			}
  			
  			if(jjtGetParent().getParentType().equals("scale"))
  			{
  				scaleX = jjtGetParent().getScaleX();
  				scaleY = jjtGetParent().getScaleY();
  				
  				for(int i = 0; i < sizeOfChild()-2; i++)
   				{
   					temp = temp + ("<line");
   					temp = temp + (" x1=\"" + (((ASTInt) jjtGetChild(i)).val * scaleX) + "\"");
		    		temp = temp + (" y1=\"" + (((ASTInt) jjtGetChild(i+1)).val * scaleY) + "\"");
   					temp = temp + (" x2=\"" + (((ASTInt) jjtGetChild(i+2)).val * scaleX) + "\"");
		   			temp = temp + (" y2=\"" + (((ASTInt) jjtGetChild(i+3)).val * scaleY) + "\"");
   					temp = temp + (" stroke=\"" + colour + "\" stroke-width=\""+brushSize+"\"/>\n");
   					i = i+1;
   				}

    	
    			temp = temp + ("<line");
		    	temp = temp + (" x1=\"" + (((ASTInt) jjtGetChild(childSize-2)).val * scaleX) + "\"");
    			temp = temp + (" y1=\"" + (((ASTInt) jjtGetChild(childSize-1)).val * scaleY) + "\"");
		    	temp = temp + (" x2=\"" + (((ASTInt) jjtGetChild(0)).val * scaleX) + "\"");
    			temp = temp + (" y2=\"" + (((ASTInt) jjtGetChild(1)).val * scaleY) + "\"");
		    	temp = temp + (" stroke=\"" + colour + "\" stroke-width=\""+brushSize+"\"/>");
  			}
  			
  			if(jjtGetParent().getParentType().equals("repeat"))
  			{
  				repeatX = jjtGetParent().getRepeatX();
  				repeatY = jjtGetParent().getRepeatY();
  				noRepeat = jjtGetParent().getNoRepeat();
  				int inc = 1;
  				
  				for(int loop = 0; loop < noRepeat; loop++)
  				{
	  				for(int i = 0; i < sizeOfChild()-2; i++)
	   				{
	   					temp = temp + ("<line");
	   					temp = temp + (" x1=\"" + ((((ASTInt) jjtGetChild(i)).val) + (inc*repeatX)) + "\"");
			    		temp = temp + (" y1=\"" + ((((ASTInt) jjtGetChild(i+1)).val) + (inc*repeatY)) + "\"");
	   					temp = temp + (" x2=\"" + ((((ASTInt) jjtGetChild(i+2)).val) + (inc*repeatX)) + "\"");
			   			temp = temp + (" y2=\"" + ((((ASTInt) jjtGetChild(i+3)).val) + (inc*repeatY)) + "\"");
	   					temp = temp + (" stroke=\"" + colour + "\" stroke-width=\""+brushSize+"\"/>\n");
	   					i = i+1;
	   				}

	    	
	    			temp = temp + ("<line");
			    	temp = temp + (" x1=\"" + (((ASTInt) jjtGetChild(childSize-2)).val + (inc*repeatX)) + "\"");
	    			temp = temp + (" y1=\"" + (((ASTInt) jjtGetChild(childSize-1)).val + (inc*repeatX)) + "\"");
			    	temp = temp + (" x2=\"" + (((ASTInt) jjtGetChild(0)).val + (inc*repeatX)) + "\"");
	    			temp = temp + (" y2=\"" + (((ASTInt) jjtGetChild(1)).val + (inc*repeatX)) + "\"");
			    	temp = temp + (" stroke=\"" + colour + "\" stroke-width=\""+brushSize+"\"/>");
			    	
			    	inc++;
			    }
  			}
  			
  			/*************************************************

			Checks if parent of parent type is null
	
			*************************************************/
  			
  			if(!(jjtGetParent().jjtGetParent().getParentType() == null))
        	{
  		
  				if(jjtGetParent().jjtGetParent().getParentType().equals("brush"))
  				{
  					brushSize = jjtGetParent().jjtGetParent().getBrush();
  				}
  		
  				if(jjtGetParent().jjtGetParent().getParentType().equals("colour"))
  				{
  					colour = jjtGetParent().jjtGetParent().getColour();
  				}
  		
  				if(jjtGetParent().jjtGetParent().getParentType().equals("offset"))
  				{
  					offsetX = jjtGetParent().jjtGetParent().getOffsetX();
  					offsetY = jjtGetParent().jjtGetParent().getOffsetY();
  					
  					for(int i = 0; i < sizeOfChild()-2; i++)
   					{
	  					temp = temp + ("<line");
   						temp = temp + (" x1=\"" + (((ASTInt) jjtGetChild(i)).val + offsetX) + "\"");
			    		temp = temp + (" y1=\"" + (((ASTInt) jjtGetChild(i+1)).val + offsetY) + "\"");
   						temp = temp + (" x2=\"" + (((ASTInt) jjtGetChild(i+2)).val + offsetX) + "\"");
		   				temp = temp + (" y2=\"" + (((ASTInt) jjtGetChild(i+3)).val + offsetY) + "\"");
   						temp = temp + (" stroke=\"" + colour + "\" stroke-width=\""+brushSize+"\"/>\n");
   						i = i+1;
   					}

    	
	    			temp = temp + ("<line");
			    	temp = temp + (" x1=\"" + (((ASTInt) jjtGetChild(childSize-2)).val + offsetX) + "\"");
    				temp = temp + (" y1=\"" + (((ASTInt) jjtGetChild(childSize-1)).val + offsetY) + "\"");
		    		temp = temp + (" x2=\"" + (((ASTInt) jjtGetChild(0)).val + offsetX) + "\"");
    				temp = temp + (" y2=\"" + (((ASTInt) jjtGetChild(1)).val + offsetY) + "\"");
		    		temp = temp + (" stroke=\"" + colour + "\" stroke-width=\""+brushSize+"\"/>");
  				}
  				
  				if(jjtGetParent().jjtGetParent().getParentType().equals("scale"))
  				{
  					scaleX = jjtGetParent().jjtGetParent().getScaleX();
  					scaleY = jjtGetParent().jjtGetParent().getScaleY();
  					
  					for(int i = 0; i < sizeOfChild()-2; i++)
   					{
   						temp = temp + ("<line");
   						temp = temp + (" x1=\"" + (((ASTInt) jjtGetChild(i)).val * scaleX) + "\"");
		    			temp = temp + (" y1=\"" + (((ASTInt) jjtGetChild(i+1)).val * scaleY) + "\"");
   						temp = temp + (" x2=\"" + (((ASTInt) jjtGetChild(i+2)).val * scaleX) + "\"");
		   				temp = temp + (" y2=\"" + (((ASTInt) jjtGetChild(i+3)).val * scaleY) + "\"");
   						temp = temp + (" stroke=\"" + colour + "\" stroke-width=\""+brushSize+"\"/>\n");
   						i = i+1;
   					}

    	
    				temp = temp + ("<line");
		    		temp = temp + (" x1=\"" + (((ASTInt) jjtGetChild(childSize-2)).val * scaleX) + "\"");
    				temp = temp + (" y1=\"" + (((ASTInt) jjtGetChild(childSize-1)).val * scaleY) + "\"");
		    		temp = temp + (" x2=\"" + (((ASTInt) jjtGetChild(0)).val * scaleX) + "\"");
    				temp = temp + (" y2=\"" + (((ASTInt) jjtGetChild(1)).val * scaleY) + "\"");
		    		temp = temp + (" stroke=\"" + colour + "\" stroke-width=\""+brushSize+"\"/>");
  				}
  				
  				if(jjtGetParent().jjtGetParent().getParentType().equals("repeat"))
  				{
  					repeatX = jjtGetParent().jjtGetParent().getRepeatX();
	  				repeatY = jjtGetParent().jjtGetParent().getRepeatY();
	  				noRepeat = jjtGetParent().jjtGetParent().getNoRepeat();
	  				int inc = 1;
	  				
	  				for(int loop = 0; loop < noRepeat; loop++)
	  				{
		  				for(int i = 0; i < sizeOfChild()-2; i++)
		   				{
		   					temp = temp + ("<line");
		   					temp = temp + (" x1=\"" + ((((ASTInt) jjtGetChild(i)).val) + (inc*repeatX)) + "\"");
				    		temp = temp + (" y1=\"" + ((((ASTInt) jjtGetChild(i+1)).val) + (inc*repeatY)) + "\"");
		   					temp = temp + (" x2=\"" + ((((ASTInt) jjtGetChild(i+2)).val) + (inc*repeatX)) + "\"");
				   			temp = temp + (" y2=\"" + ((((ASTInt) jjtGetChild(i+3)).val) + (inc*repeatY)) + "\"");
		   					temp = temp + (" stroke=\"" + colour + "\" stroke-width=\""+brushSize+"\"/>\n");
		   					i = i+1;
		   				}

		    	
		    			temp = temp + ("<line");
				    	temp = temp + (" x1=\"" + (((ASTInt) jjtGetChild(childSize-2)).val + (inc*repeatX)) + "\"");
		    			temp = temp + (" y1=\"" + (((ASTInt) jjtGetChild(childSize-1)).val + (inc*repeatX)) + "\"");
				    	temp = temp + (" x2=\"" + (((ASTInt) jjtGetChild(0)).val + (inc*repeatX)) + "\"");
		    			temp = temp + (" y2=\"" + (((ASTInt) jjtGetChild(1)).val + (inc*repeatX)) + "\"");
				    	temp = temp + (" stroke=\"" + colour + "\" stroke-width=\""+brushSize+"\"/>");
				    	
				    	inc++;
				    }
  				}
  				
  				/*************************************************

				Checks if parent of parent of parent type is null
	
				*************************************************/
  				
  				if(!(jjtGetParent().jjtGetParent().jjtGetParent().getParentType() == null))
  				{
  					if(jjtGetParent().jjtGetParent().jjtGetParent().getParentType().equals("brush"))
  					{
  						brushSize = jjtGetParent().jjtGetParent().jjtGetParent().getBrush();
  					}
  		
  					if(jjtGetParent().jjtGetParent().jjtGetParent().getParentType().equals("colour"))
  					{
  						colour = jjtGetParent().jjtGetParent().jjtGetParent().getColour();
  					}
  		
  					if(jjtGetParent().jjtGetParent().jjtGetParent().getParentType().equals("offset"))
  					{	
  						offsetX = jjtGetParent().jjtGetParent().jjtGetParent().getOffsetX();
  						offsetY = jjtGetParent().jjtGetParent().jjtGetParent().getOffsetY();
  						
  						for(int i = 0; i < sizeOfChild()-2; i++)
		   				{
   							temp = temp + ("<line");
   							temp = temp + (" x1=\"" + (((ASTInt) jjtGetChild(i)).val + offsetX) + "\"");
				    		temp = temp + (" y1=\"" + (((ASTInt) jjtGetChild(i+1)).val + offsetY) + "\"");
   							temp = temp + (" x2=\"" + (((ASTInt) jjtGetChild(i+2)).val + offsetX) + "\"");
		   					temp = temp + (" y2=\"" + (((ASTInt) jjtGetChild(i+3)).val + offsetY) + "\"");
		   					temp = temp + (" stroke=\"" + colour + "\" stroke-width=\""+brushSize+"\"/>\n");
   							i = i+1;
   						}

    	
		    			temp = temp + ("<line");
				    	temp = temp + (" x1=\"" + (((ASTInt) jjtGetChild(childSize-2)).val + offsetX) + "\"");
    					temp = temp + (" y1=\"" + (((ASTInt) jjtGetChild(childSize-1)).val + offsetY) + "\"");
				    	temp = temp + (" x2=\"" + (((ASTInt) jjtGetChild(0)).val + offsetX) + "\"");
    					temp = temp + (" y2=\"" + (((ASTInt) jjtGetChild(1)).val + offsetY) + "\"");
		    			temp = temp + (" stroke=\"" + colour + "\" stroke-width=\""+brushSize+"\"/>");
  					}
  					
  					if(jjtGetParent().jjtGetParent().jjtGetParent().getParentType().equals("scale"))
  					{
  						scaleX = jjtGetParent().jjtGetParent().jjtGetParent().getScaleX();
  						scaleY = jjtGetParent().jjtGetParent().jjtGetParent().getScaleY();
  						
  						for(int i = 0; i < sizeOfChild()-2; i++)
   						{
   							temp = temp + ("<line");
		   					temp = temp + (" x1=\"" + (((ASTInt) jjtGetChild(i)).val * scaleX) + "\"");
				    		temp = temp + (" y1=\"" + (((ASTInt) jjtGetChild(i+1)).val * scaleY) + "\"");
   							temp = temp + (" x2=\"" + (((ASTInt) jjtGetChild(i+2)).val * scaleX) + "\"");
				   			temp = temp + (" y2=\"" + (((ASTInt) jjtGetChild(i+3)).val * scaleY) + "\"");
   							temp = temp + (" stroke=\"" + colour + "\" stroke-width=\""+brushSize+"\"/>\n");
   							i = i+1;
   						}

    	
    					temp = temp + ("<line");
				    	temp = temp + (" x1=\"" + (((ASTInt) jjtGetChild(childSize-2)).val * scaleX) + "\"");
    					temp = temp + (" y1=\"" + (((ASTInt) jjtGetChild(childSize-1)).val * scaleY) + "\"");
		    			temp = temp + (" x2=\"" + (((ASTInt) jjtGetChild(0)).val * scaleX) + "\"");
		    			temp = temp + (" y2=\"" + (((ASTInt) jjtGetChild(1)).val * scaleY) + "\"");
				    	temp = temp + (" stroke=\"" + colour + "\" stroke-width=\""+brushSize+"\"/>");
  					}
  					
  					if(jjtGetParent().jjtGetParent().jjtGetParent().getParentType().equals("repeat"))
	  				{
	  					repeatX = jjtGetParent().jjtGetParent().jjtGetParent().getRepeatX();
		  				repeatY = jjtGetParent().jjtGetParent().jjtGetParent().getRepeatY();
		  				noRepeat = jjtGetParent().jjtGetParent().jjtGetParent().getNoRepeat();
		  				int inc = 1;
		  				
		  				for(int loop = 0; loop < noRepeat; loop++)
		  				{
			  				for(int i = 0; i < sizeOfChild()-2; i++)
			   				{
			   					temp = temp + ("<line");
			   					temp = temp + (" x1=\"" + ((((ASTInt) jjtGetChild(i)).val) + (inc*repeatX)) + "\"");
					    		temp = temp + (" y1=\"" + ((((ASTInt) jjtGetChild(i+1)).val) + (inc*repeatY)) + "\"");
			   					temp = temp + (" x2=\"" + ((((ASTInt) jjtGetChild(i+2)).val) + (inc*repeatX)) + "\"");
					   			temp = temp + (" y2=\"" + ((((ASTInt) jjtGetChild(i+3)).val) + (inc*repeatY)) + "\"");
			   					temp = temp + (" stroke=\"" + colour + "\" stroke-width=\""+brushSize+"\"/>\n");
			   					i = i+1;
			   				}

			    	
			    			temp = temp + ("<line");
					    	temp = temp + (" x1=\"" + (((ASTInt) jjtGetChild(childSize-2)).val + (inc*repeatX)) + "\"");
			    			temp = temp + (" y1=\"" + (((ASTInt) jjtGetChild(childSize-1)).val + (inc*repeatX)) + "\"");
					    	temp = temp + (" x2=\"" + (((ASTInt) jjtGetChild(0)).val + (inc*repeatX)) + "\"");
			    			temp = temp + (" y2=\"" + (((ASTInt) jjtGetChild(1)).val + (inc*repeatX)) + "\"");
					    	temp = temp + (" stroke=\"" + colour + "\" stroke-width=\""+brushSize+"\"/>");
					    	
					    	inc++;
					    }
	  				}
	  				
	  				/*************************************************

					Checks if parent of parent of parent of parent's 
					type is null
	
					*************************************************/
  					
  					if(!(jjtGetParent().jjtGetParent().jjtGetParent().jjtGetParent().getParentType()==null))
  					{
  						if(jjtGetParent().jjtGetParent().jjtGetParent().jjtGetParent().getParentType().equals("brush"))
  						{
  							brushSize = jjtGetParent().jjtGetParent().jjtGetParent().getBrush();
  						}
  		
  						if(jjtGetParent().jjtGetParent().jjtGetParent().jjtGetParent().getParentType().equals("colour"))
  						{
  							colour = jjtGetParent().jjtGetParent().jjtGetParent().getColour();
  						}
  		
  						if(jjtGetParent().jjtGetParent().jjtGetParent().jjtGetParent().getParentType().equals("offset"))
  						{	
  							offsetX = jjtGetParent().jjtGetParent().jjtGetParent().getOffsetX();
  							offsetY = jjtGetParent().jjtGetParent().jjtGetParent().getOffsetY();
  							
  							for(int i = 0; i < sizeOfChild()-2; i++)
		   					{
   								temp = temp + ("<line");
	   							temp = temp + (" x1=\"" + (((ASTInt) jjtGetChild(i)).val + offsetX) + "\"");
					    		temp = temp + (" y1=\"" + (((ASTInt) jjtGetChild(i+1)).val + offsetY) + "\"");
   								temp = temp + (" x2=\"" + (((ASTInt) jjtGetChild(i+2)).val + offsetX) + "\"");
		   						temp = temp + (" y2=\"" + (((ASTInt) jjtGetChild(i+3)).val + offsetY) + "\"");
		   						temp = temp + (" stroke=\"" + colour + "\" stroke-width=\""+brushSize+"\"/>\n");
   								i = i+1;
   							}

    	
			    			temp = temp + ("<line");
					    	temp = temp + (" x1=\"" + (((ASTInt) jjtGetChild(childSize-2)).val + offsetX) + "\"");
    						temp = temp + (" y1=\"" + (((ASTInt) jjtGetChild(childSize-1)).val + offsetY) + "\"");
					    	temp = temp + (" x2=\"" + (((ASTInt) jjtGetChild(0)).val + offsetX) + "\"");
    						temp = temp + (" y2=\"" + (((ASTInt) jjtGetChild(1)).val + offsetY) + "\"");
		    				temp = temp + (" stroke=\"" + colour + "\" stroke-width=\""+brushSize+"\"/>");
  						}
  					
  						if(jjtGetParent().jjtGetParent().jjtGetParent().jjtGetParent().getParentType().equals("scale"))
  						{
  							scaleX = jjtGetParent().jjtGetParent().jjtGetParent().jjtGetParent().getScaleX();
  							scaleY = jjtGetParent().jjtGetParent().jjtGetParent().jjtGetParent().getScaleY();
  							
  							for(int i = 0; i < sizeOfChild()-2; i++)
   							{
		   							temp = temp + ("<line");
				   					temp = temp + (" x1=\"" + (((ASTInt) jjtGetChild(i)).val * scaleX) + "\"");
						    		temp = temp + (" y1=\"" + (((ASTInt) jjtGetChild(i+1)).val * scaleY) + "\"");
   									temp = temp + (" x2=\"" + (((ASTInt) jjtGetChild(i+2)).val * scaleX) + "\"");
						   			temp = temp + (" y2=\"" + (((ASTInt) jjtGetChild(i+3)).val * scaleY) + "\"");
   									temp = temp + (" stroke=\"" + colour + "\" stroke-width=\""+brushSize+"\"/>\n");
   									i = i+1;
   							}

    	
	    					temp = temp + ("<line");
					    	temp = temp + (" x1=\"" + (((ASTInt) jjtGetChild(childSize-2)).val * scaleX) + "\"");
    						temp = temp + (" y1=\"" + (((ASTInt) jjtGetChild(childSize-1)).val * scaleY) + "\"");
		    				temp = temp + (" x2=\"" + (((ASTInt) jjtGetChild(0)).val * scaleX) + "\"");
		    				temp = temp + (" y2=\"" + (((ASTInt) jjtGetChild(1)).val * scaleY) + "\"");
					    	temp = temp + (" stroke=\"" + colour + "\" stroke-width=\""+brushSize+"\"/>");
  						}
  						
  						if(jjtGetParent().jjtGetParent().jjtGetParent().jjtGetParent().getParentType().equals("repeat"))
		  				{
		  					repeatX = jjtGetParent().jjtGetParent().jjtGetParent().jjtGetParent().getRepeatX();
			  				repeatY = jjtGetParent().jjtGetParent().jjtGetParent().jjtGetParent().getRepeatY();
			  				noRepeat = jjtGetParent().jjtGetParent().jjtGetParent().jjtGetParent().getNoRepeat();
			  				int inc = 1;
			  				
			  				for(int loop = 0; loop < noRepeat; loop++)
			  				{
				  				for(int i = 0; i < sizeOfChild()-2; i++)
				   				{
				   					temp = temp + ("<line");
				   					temp = temp + (" x1=\"" + ((((ASTInt) jjtGetChild(i)).val) + (inc*repeatX)) + "\"");
						    		temp = temp + (" y1=\"" + ((((ASTInt) jjtGetChild(i+1)).val) + (inc*repeatY)) + "\"");
				   					temp = temp + (" x2=\"" + ((((ASTInt) jjtGetChild(i+2)).val) + (inc*repeatX)) + "\"");
						   			temp = temp + (" y2=\"" + ((((ASTInt) jjtGetChild(i+3)).val) + (inc*repeatY)) + "\"");
				   					temp = temp + (" stroke=\"" + colour + "\" stroke-width=\""+brushSize+"\"/>\n");
				   					i = i+1;
				   				}

				    	
				    			temp = temp + ("<line");
						    	temp = temp + (" x1=\"" + (((ASTInt) jjtGetChild(childSize-2)).val + (inc*repeatX)) + "\"");
				    			temp = temp + (" y1=\"" + (((ASTInt) jjtGetChild(childSize-1)).val + (inc*repeatX)) + "\"");
						    	temp = temp + (" x2=\"" + (((ASTInt) jjtGetChild(0)).val + (inc*repeatX)) + "\"");
				    			temp = temp + (" y2=\"" + (((ASTInt) jjtGetChild(1)).val + (inc*repeatX)) + "\"");
						    	temp = temp + (" stroke=\"" + colour + "\" stroke-width=\""+brushSize+"\"/>");
						    	
						    	inc++;
						    }
		  				}
		  				
		  				/*************************************************

						Checks if parent of parent of parent of parent of 
						parent's type is null
	
						*************************************************/
		  				
		  				if(!(jjtGetParent().jjtGetParent().jjtGetParent().jjtGetParent().jjtGetParent().getParentType()==null))
	  					{
	  						if(jjtGetParent().jjtGetParent().jjtGetParent().jjtGetParent().jjtGetParent().getParentType().equals("brush"))
	  						{
	  							brushSize = jjtGetParent().jjtGetParent().jjtGetParent().jjtGetParent().getBrush();
	  						}
	  		
	  						if(jjtGetParent().jjtGetParent().jjtGetParent().jjtGetParent().jjtGetParent().getParentType().equals("colour"))
	  						{
	  							colour = jjtGetParent().jjtGetParent().jjtGetParent().jjtGetParent().getColour();
	  						}
	  		
	  						if(jjtGetParent().jjtGetParent().jjtGetParent().jjtGetParent().jjtGetParent().getParentType().equals("offset"))
	  						{	
	  							offsetX = jjtGetParent().jjtGetParent().jjtGetParent().jjtGetParent().getOffsetX();
	  							offsetY = jjtGetParent().jjtGetParent().jjtGetParent().jjtGetParent().getOffsetY();
	  							
	  							for(int i = 0; i < sizeOfChild()-2; i++)
			   					{
	   								temp = temp + ("<line");
		   							temp = temp + (" x1=\"" + (((ASTInt) jjtGetChild(i)).val + offsetX) + "\"");
						    		temp = temp + (" y1=\"" + (((ASTInt) jjtGetChild(i+1)).val + offsetY) + "\"");
	   								temp = temp + (" x2=\"" + (((ASTInt) jjtGetChild(i+2)).val + offsetX) + "\"");
			   						temp = temp + (" y2=\"" + (((ASTInt) jjtGetChild(i+3)).val + offsetY) + "\"");
			   						temp = temp + (" stroke=\"" + colour + "\" stroke-width=\""+brushSize+"\"/>\n");
	   								i = i+1;
	   							}

	    	
				    			temp = temp + ("<line");
						    	temp = temp + (" x1=\"" + (((ASTInt) jjtGetChild(childSize-2)).val + offsetX) + "\"");
	    						temp = temp + (" y1=\"" + (((ASTInt) jjtGetChild(childSize-1)).val + offsetY) + "\"");
						    	temp = temp + (" x2=\"" + (((ASTInt) jjtGetChild(0)).val + offsetX) + "\"");
	    						temp = temp + (" y2=\"" + (((ASTInt) jjtGetChild(1)).val + offsetY) + "\"");
			    				temp = temp + (" stroke=\"" + colour + "\" stroke-width=\""+brushSize+"\"/>");
	  						}
	  					
	  						if(jjtGetParent().jjtGetParent().jjtGetParent().jjtGetParent().jjtGetParent().getParentType().equals("scale"))
	  						{
	  							scaleX = jjtGetParent().jjtGetParent().jjtGetParent().jjtGetParent().jjtGetParent().getScaleX();
	  							scaleY = jjtGetParent().jjtGetParent().jjtGetParent().jjtGetParent().jjtGetParent().getScaleY();
	  							
	  							for(int i = 0; i < sizeOfChild()-2; i++)
	   							{
			   							temp = temp + ("<line");
					   					temp = temp + (" x1=\"" + (((ASTInt) jjtGetChild(i)).val * scaleX) + "\"");
							    		temp = temp + (" y1=\"" + (((ASTInt) jjtGetChild(i+1)).val * scaleY) + "\"");
	   									temp = temp + (" x2=\"" + (((ASTInt) jjtGetChild(i+2)).val * scaleX) + "\"");
							   			temp = temp + (" y2=\"" + (((ASTInt) jjtGetChild(i+3)).val * scaleY) + "\"");
	   									temp = temp + (" stroke=\"" + colour + "\" stroke-width=\""+brushSize+"\"/>\n");
	   									i = i+1;
	   							}

	    	
		    					temp = temp + ("<line");
						    	temp = temp + (" x1=\"" + (((ASTInt) jjtGetChild(childSize-2)).val * scaleX) + "\"");
	    						temp = temp + (" y1=\"" + (((ASTInt) jjtGetChild(childSize-1)).val * scaleY) + "\"");
			    				temp = temp + (" x2=\"" + (((ASTInt) jjtGetChild(0)).val * scaleX) + "\"");
			    				temp = temp + (" y2=\"" + (((ASTInt) jjtGetChild(1)).val * scaleY) + "\"");
						    	temp = temp + (" stroke=\"" + colour + "\" stroke-width=\""+brushSize+"\"/>");
	  						}
	  						
	  						if(jjtGetParent().jjtGetParent().jjtGetParent().jjtGetParent().jjtGetParent().getParentType().equals("repeat"))
			  				{
			  					repeatX = jjtGetParent().jjtGetParent().jjtGetParent().jjtGetParent().jjtGetParent().getRepeatX();
				  				repeatY = jjtGetParent().jjtGetParent().jjtGetParent().jjtGetParent().jjtGetParent().getRepeatY();
				  				noRepeat = jjtGetParent().jjtGetParent().jjtGetParent().jjtGetParent().jjtGetParent().getNoRepeat();
				  				int inc = 1;
				  				
				  				for(int loop = 0; loop < noRepeat; loop++)
				  				{
					  				for(int i = 0; i < sizeOfChild()-2; i++)
					   				{
					   					temp = temp + ("<line");
					   					temp = temp + (" x1=\"" + ((((ASTInt) jjtGetChild(i)).val) + (inc*repeatX)) + "\"");
							    		temp = temp + (" y1=\"" + ((((ASTInt) jjtGetChild(i+1)).val) + (inc*repeatY)) + "\"");
					   					temp = temp + (" x2=\"" + ((((ASTInt) jjtGetChild(i+2)).val) + (inc*repeatX)) + "\"");
							   			temp = temp + (" y2=\"" + ((((ASTInt) jjtGetChild(i+3)).val) + (inc*repeatY)) + "\"");
					   					temp = temp + (" stroke=\"" + colour + "\" stroke-width=\""+brushSize+"\"/>\n");
					   					i = i+1;
					   				}

					    	
					    			temp = temp + ("<line");
							    	temp = temp + (" x1=\"" + (((ASTInt) jjtGetChild(childSize-2)).val + (inc*repeatX)) + "\"");
					    			temp = temp + (" y1=\"" + (((ASTInt) jjtGetChild(childSize-1)).val + (inc*repeatX)) + "\"");
							    	temp = temp + (" x2=\"" + (((ASTInt) jjtGetChild(0)).val + (inc*repeatX)) + "\"");
					    			temp = temp + (" y2=\"" + (((ASTInt) jjtGetChild(1)).val + (inc*repeatX)) + "\"");
							    	temp = temp + (" stroke=\"" + colour + "\" stroke-width=\""+brushSize+"\"/>");
							    	
							    	inc++;
							    }
			  				}
		  				}
  					}
  				}
  			}
  		}
    	
    	return temp;
    	
  	}
  	
  	/*************************************************

	Methods needed by Node interface
	
	*************************************************/
  	
  	public void generate()
  	{
    }
  	
  	public int getBrush()
  	{
  		return 0;
  	}
  	 
  	 public String getColour()
  	{
  		return null;
  	}
  	
  	public String getParentType()
  	{
  		return null;
  	}
  	
  	public int getOffsetX()
  	{
  		return 0;
  	}
  
  	public int getOffsetY()
	{
  		return 0;
  	}
  	
  	public int getScaleX()
  	{
  		return 0;
  	}
  
  	public int getScaleY()
  	{
  		return 0;
  	}
  	
  	public int getRepeatX()
  	{
  		return 0;
  	}
  	
  	public int getRepeatY()
  	{
  		return 0;
  	}
  	
  	public int getNoRepeat()
  	{
  		return 0;
  	}

}
