是否可以擦除 NSRectFill 绘制的图形?
我一直在使用 NSRectFill 在屏幕上绘制矩形。我想删除这些矩形。我无法在它们上面绘画,因为它们后面的背景有纹理,无法用纯色复制。这可能吗?
I have been using NSRectFill
to draw rectangles on the screen. I would like to erase these rectangles. I can't paint over them, as the back ground behind them is textured and can't be replicated with a solid color. Is this possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不太了解 Objective-C 或 Cocoa,所以我无法向您提供详细信息,但这就是我面向 Windows 的思维的想法:
只需请求重绘窗口,然后不绘制矩形。
I don't know much Objective-C, or Cocoa, so I can't give you details, but here's how my Windows oriented mind thinks:
Simply request a redrawing of the window, and then don't paint the rectangles.
重新画一下背景就可以了。
Just draw the background again.