Hi Ken,
I don't think I want to wade through all your goto's :P
But on line 196 I see a CopyImage statement, that I thought you removed?
This is in the wrong place anyway. A snapshot of the screen should be after drawing a line with the end point clicked in.
Before then you are drawing lines from first click to mouse position but NOT saving the screen image.
To save a screen image, I prefer this method:
1. set up a new handle say picture&
picture& = _newimage(numbers same as screen setup) 'this is your storage container
when the 2nd point is clicked in for Ray:
_putimage , 0, picture& 'source to destination = screen to container
then at beginning of next drawing loop erase old screen by placing the image in picture& contain to screen:
_putimage , picture& , 0 ' container to screen 'always right after the start of loop
'Here is the Ray Lines code.
rMode = 1 - rMode
lastx = mouseX: lastY = mouseY 'set first lastx, lasty
''''''''''''''''''''''''''''''j& = _COPYIMAGE(0)
LINE (lastx
, lastY
)-(mouseX
, mouseY
), clr~&
'_display 'if you are using it