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

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

File				: ASTCircle.java
Auther				: M. Spiller
Registration #		: Y0259667
Date				: Thursday 13th november 2003
Unit				: CMP-2A25 Programming - Software Development Techniques
Description			: Circle class

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

import java.io.*;

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

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

    public void generate(FileWriter SVGFile, int Xsc, int Ysc, 
							int X, int Y, String colour, int brush)
    {
		//obtains circle values from child
        int x1 = ((ASTInt)jjtGetChild(0)).val;
        int y1 = ((ASTInt)jjtGetChild(1)).val;
        int x2 = ((ASTInt)jjtGetChild(2)).val;
        int y2 = (x2 - x1) + y1;
		//draws circle with calculated values
        DrawEllipse(SVGFile, Xsc, Ysc, X, Y, colour, brush, x1, y1, x2, y2);
    }
}
