/*
	param line

	Draw a beam of lines
	Modify n: the number of lines drawn

*/

address 'rexx_TVPaint'
	
	parse ARG m x1 y1 x2 y2 b
	if(m~='Line')then
	do
		tv_warn 'I need LINE parameters'
		exit
	end

	n=30

	tv_UpdateUndo

	tv_line x1 y1 x2 y2
	do i=1 to n
		w=(abs(x2-x1)+abs(y2-y1))%4
		a=random(1,w*2,time('S'))
		a=a-w
		b=random(1,w*2,time('S'))
		b=b-w
		tv_line x1+a y1+b x2+a y2+b
	end

