gpt4 book ai didi

cocoa - 捕获一个 View 并输出到另一个 View

转载 作者:行者123 更新时间:2023-12-03 17:26:46 26 4
gpt4 key购买 nike

寻找一种冲动,如何完成它。我知道可以捕获 iSight,但我不知道如何捕获屏幕并将其实时输出到另一个...不会有记录,只是输出...如果有人可以给我,那就太好了一个提示。

提前致谢

最佳答案

Capture one view and output to an other view

要捕获 View ,ask it for PDF data depicting what's within它的bounds 。要在应用程序的其他位置显示它,您可以 create a PDF image rep , create an NSImage ,和put the image rep into the image .

或者,lock focus on the view , create an NSBitmapImageRep with the contents of the view (再次通过 View 的边界),和 unlock focus on the view ,然后创建一个图像并按照与上面相同的方式将图像代表放入其中。

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

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

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

关于cocoa - 捕获一个 View 并输出到另一个 View ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2983829/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com