可可抽吸噪音

发布于 2024-11-14 19:40:29 字数 157 浏览 8 评论 0原文

是否可以在使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

半边脸i 2024-11-21 19:40:29

您可以使用绘图逻辑(绘制大量小矩形、直线或其他多边形),也可以使用 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:

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文