问题描述
我希望能够做出类似于以下所示的通用访问缩放窗口的内容。我已经创建了一个NSView并使用填充操作创建了一个带有清晰的透明组合的矩形,以查看我的窗口并显示桌面。现在,我想知道是否可以像下面的图片一样在视图中放大和缩小。我以为这可能是IkImageView或我可以应用的东西,但我当时确定它是如何完成的。有谁知道该怎么做或告诉我在文档中可以找到的地方?一些代码会很棒。谢谢!
看看苹果公司的示例 CIAnnotation 。在此示例中,图像被放大,但是我认为您可以实现所需的功能。您可以从
I am hoping to be able to make something similar to the universal access zoom window shown below. I have already created an NSView and using a fill operation I made a rect with a clear "see through" composite to see through my window and show the desktop. Now I am wondering if it is possible to zoom in and out inside my view just like the picture below. I was thinking this might be an IkImageView or something I could apply but i wasent sure how it was done. Does anyone know how to do this or show me where I could find this in the docs? Some code would be great. Thanks!
Take a look at Apple's example CIAnnotation. In this example is magnifying image but I think You can achieve what You want. You can download sample code from here.
CIAnnotation app example:
References and guides which can help You with this:
Core Image Programming guide
Quartz 2D Programming Guide
NSGraphicsContext Class Reference
这篇关于通过NSView或放大来放大和缩小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!