如何在 iPhone 的 Quartz 中获得发光效果?
我正在为 iphone 寻找 2d 石英的发光效果。我尝试用不同的 alpha 值制作线条来模拟发光,但它不起作用......
任何人都可以帮助我吗?
附注 我正在制作一个应用程序,用户可以在其中使用发光进行绘画。我有基本的线条,但没有发光:(
I am searching for a glow effect in quartz 2d for the iphone. I tried making lines with different alpha values to simulate glow but it didn't work...
Can anyone help me with that ??
p.s.
I'm making an app where the user can draw with glow. I have the basic lines, but no glow :(
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我所知,Core Animation / Quartz 2D Compositing 滤镜目前在 iOS 中不可用。
http://developer.apple.com/iphone/library/documentation/GraphicsImaging/Reference/CALayer_class/Introduction/Introduction.html#//apple_ref/occ/instp/CALayer/compositingFilter,章节:特殊注意事项
但是,您可能还有其他一些方法可以使用阴影实现发光效果:将发光效果添加到圆圈
我希望这有帮助,亲切的问候......
As far as I know, the Core Animation / Quartz 2D Compositing filters are currently not available in iOS.
http://developer.apple.com/iphone/library/documentation/GraphicsImaging/Reference/CALayer_class/Introduction/Introduction.html#//apple_ref/occ/instp/CALayer/compositingFilter, chapter: Special Considerations
But there may be some other ways you could achieve your glow effect using shadows: Adding glowing effect to the circle
I hope this helped, kind regards...