tags:

views:

21

answers:

1

Hi,

looking for an impulse, how to get that done. I know that it is possible to capture the iSight but I have no Idea how to capture the screen and output it in realtime to an other... there will be no recording, just output... would be nice if someone could give me an hint.

thx in advance

A: 

Capture one view and output to an other view

To capture a view, ask it for PDF data depicting what's within its bounds. To display it elsewhere in your application, you can create a PDF image rep, create an NSImage, and put the image rep into the image.

Alternatively, lock focus on the view, create an NSBitmapImageRep with the contents of the view (again passing the view's bounds), and unlock focus on the view, then create an image and put the image rep into it the same way as above.

… I have no Idea how to capture the screen and output it in realtime to an other...

To capture the screen (or any portion of it), see my answer on this other question.

Either way, once you have an image, simply put that into an image view. If you want continuous updating, you'll want to do this on a timer.

Peter Hosey
Thanks, will start digging there. Maybe the second hint alone will do it.
killerapfel