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

import java.io.*;

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

	public ASTPolygon(DrawPhase1 p, int id) 
	{
		super(p, id);
	}

	public void generate(FileWriter SVGFile)
    {
        int x = jjtGetNumChildren();
        for(int y = 2; y < x; y += 2)
		{
            DrawLine
				(SVGFile,
				((ASTInt)jjtGetChild(y - 2)).val, 
				((ASTInt)jjtGetChild(y - 1)).val, 
				((ASTInt)jjtGetChild(y)).val, 
				((ASTInt)jjtGetChild(y + 1)).val
			);

			DrawLine
				(SVGFile,
				((ASTInt)jjtGetChild(x - 2)).val, 
				((ASTInt)jjtGetChild(x - 1)).val, 
				((ASTInt)jjtGetChild(0)).val, 
				((ASTInt)jjtGetChild(1)).val
			);
		}
	}
}
