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

/**************************************************************

File				: ASTScale.java
Auther				: M. Spiller
Registration #		: Y0259667
Date				: Thursday 13th november 2003
Unit				: CMP-2A25 Programming - Software Development Techniques
Description			: Scale class containing method to apply scale values

**************************************************************/

import java.io.*;

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

	public ASTScale(DrawPhase3 p, int id) 
	{
		super(p, id);
	}

	public void generate(FileWriter SVGFile, int Xsc, int Ysc, 
						int X, int Y, String colour, int brush)
    {
		//calculates new X and Y values
		int Xscale = Xsc * ((ASTInt)jjtGetChild(0)).val;
		int Yscale = Ysc * ((ASTInt)jjtGetChild(1)).val;
		//generates object scaled
        jjtGetChild(2).generate(SVGFile, Xscale, Yscale, X, Y, colour, brush);
    }
}
