捕获一个视图并输出到另一个视图

时间:2010-06-06 10:19:30

标签: cocoa nsview

寻找冲动,如何完成。我知道有可能捕获iSight但我不知道如何捕获屏幕并将其实时输出到其他...没有录音,只输出......如果有人能给我的话会很好提示。

事先提前

1 个答案:

答案 0 :(得分:0)

  

捕获一个视图并输出到另一个视图

要捕获视图ask it for PDF data depicting what's within,请bounds。要在应用程序的其他位置显示它,您可以create a PDF image repcreate an NSImageput the image rep into the image

或者,lock focus on the viewcreate an NSBitmapImageRep with the contents of the view(再次传递视图的边界)和unlock focus on the view,然后创建一个图像并将图像代码以与上面相同的方式放入其中。

  

...我不知道如何捕捉屏幕并将其实时输出给其他人......

要捕获屏幕(或其任何部分),请参阅my answer on this other question

无论哪种方式,一旦你有了一个图像,只需将其放入image view即可。如果您想要持续更新,则需要在timer上执行此操作。

相关问题