可可抽吸噪音
是否可以在使用 NSRectFill 填充的矩形顶部绘制一些噪声?我需要让我的绘制自定义标题栏的应用程序在发布之前在 10.7 上看起来很棒,并使其看起来更像 iTunes。如果不使用图像就可以做到这一点,我会很高兴,但如果我必须包含 PNG 或其他东西作为蒙版,我会同意的。
谢谢!
Is it possible to draw some noise on top of a rect I filled using NSRectFill? I need to make my app that draws a custom title bar look wonderful on 10.7 before release, and to make it look a little more like iTunes. I would love if this is possible using no images, but if I have to include a PNG or something as a mask, I'd be fine with that.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用绘图逻辑(绘制大量小矩形、直线或其他多边形),也可以使用 NSImage 的绘图方法,例如:
drawInRect:fromRect:operation:fraction:
You can either use drawing logic (drawing a lot of small rects, lines or other polygons), or use NSImage's drawing methods, like for instance:
drawInRect:fromRect:operation:fraction: