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

public class ASTScaling extends SimpleNode 
{
	String Scaling;
	
	public ASTScaling(int id) 
	{
    	super(id);
  	}

  	public ASTScaling(drawphase2 p, int id) 
  	{
    	super(p, id);
  	}
  	
  	public void generate()
  	{
  		int scaleX = ((ASTInt) jjtGetChild(0)).val;
  		int scaleY = ((ASTInt) jjtGetChild(1)).val;
  		int combineScale = scaleX + scaleY;
  		
  		if(combineScale==0)
  		{
  			for(int i = 0; i < jjtGetNumChildren(); i++)
  			{
  				jjtGetChild(i).generate();
  			}
  		}
  		
  		else
  		{
  			
  			for(int i = 2; i < jjtGetNumChildren(); i++)
  			{
  				
  				jjtGetChild(i).generate();
  			}
  		}
  	}
  	
  	public String generateSVG()
  	{
  		String temp = "";
  		
  		int scaleX = ((ASTInt) jjtGetChild(0)).val;
  		int scaleY = ((ASTInt) jjtGetChild(1)).val;
  		int combineScale = scaleX + scaleY;
  		
  		if(combineScale==0)
  		{
  			for(int i = 0; i < jjtGetNumChildren(); i++)
  			{
  				temp = temp + jjtGetChild(i).generateSVG();
  			}
  		}
  		
  		else
  		{
  			
  			for(int i = 2; i < jjtGetNumChildren(); i++)
  			{
  				
  				temp = temp + jjtGetChild(i).generateSVG();
  			}
  		}
  		
  		return temp;
  	}
  	
  	public String getParentType()
  	{
  		String type = "scale";
  		
  		return type;
  	}
  	
  	public int getScaleX()
  	{
  		int scaleX = ((ASTInt) jjtGetChild(0)).val;
  		
  		return scaleX;
  	}
  	
  	public int getScaleY()
  	{
  		int scaleY = ((ASTInt) jjtGetChild(1)).val;
  		
  		return scaleY;
  	}
}
