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

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

  public ASTLine(drawphase1 p, int id) {
    super(p, id);
  }

  public void generate(String itemCol, int brushNo, int offsetX, int offsetY)
  {
      int x1=((ASTInt) jjtGetChild(0)).val;	
      int y1=((ASTInt) jjtGetChild(1)).val; 
      int x2=((ASTInt) jjtGetChild(2)).val;
      int y2=((ASTInt) jjtGetChild(3)).val;
	drawLine(x1,y1,x2,y2,itemCol, brushNo, offsetX, offsetY);
  }  

  public void drawLine(int x1, int y1, int x2, int y2, String itemCol, int brushNo, int offsetX, int offsetY)
  {
    System.out.println("<line x1=\"" + (x1+offsetX)+
        "\" y1=\"" + (y1+offsetY) +
        "\" x2=\"" + (x2+offsetX) +
        "\" y2=\"" + (y2+offsetY) +
        "\" stroke=\""+itemCol+"\" stroke-width=\""+brushNo+"\"/>");
  }

}
