Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我一直在用NSRectFill在屏幕上绘制矩形。我想擦除这些矩形。我不能在它们上面画画,因为它们背后的背景是有纹理的,不能用纯色复制。这可能吗?
NSRectFill
我不太了解 Objective-C 或 Cocoa,所以我不能给你详细信息,但这是我面向 Windows 的思维方式:
只需请求重绘窗口,然后不要绘制矩形。
只需再次绘制背景。