! How to take snapshot of anything on the screen
! and get it into an Alltalk ImageView.


VAR	! Make a window to do the clipping
	w := ViewWindow.new.init.draw
		.resize[40,40, 900, 400]

VAR	! Make an off-screen image structure
	im := Image.new.init[900, 400]

! Position the window so it is behind
! whatever you want to copy.
! Now 'snapshot' the image:

	w.copy[im, 0, 0]
	stdout.writeln['done...']

! To check that you got something:

	w.reset.paste[im, 0,0]

! To save the data in a file

	im.write['c:\MyImage.img']

! To make a view that contains the image:

VAR	iv := ImageView.new.init[w.content]
	iv.initSize[200,200]
	iv.resize[0, 0, 200, 200]

! Now read in the bits from the file:

	iv.read['c:\MyImage.img']

! Put something on top of the image

VAR	lamp := Lamp.new.init[w.content]
		.resize[20,20, 10, 10]
		.draw
