2010-06-06 145 views

回答

0

捕獲一個視圖,並輸出到一個其他視圖

要捕獲的圖,其ask it for PDF data depicting what's withinbounds。要在您的應用程序的其他地方顯示它,您可以使用create a PDF image rep,create an NSImageput the image rep into the image

或者,lock focus on the view,create an NSBitmapImageRep with the contents of the view(再次通過視圖的邊界)和unlock focus on the view,然後創建一個圖像,並將圖像代表與上述相同的方式。

...我不知道如何捕獲屏幕,並輸出實時到其他...

要捕獲屏幕(或其任何部分),見my answer on this other question

無論哪種方式,一旦你有一個圖像,只需將其放入一個image view。如果你想持續更新,你會想要在timer上做到這一點。

+0

謝謝,將開始挖掘那裏。也許第二個提示本身就可以做到。 – killerapfel 2010-06-06 14:05:05

相關問題