xcode 如何在 Quartz 中为 iphone 获得发光效果?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3434314/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to get a glow effect in Quartz for the iphone?
提问by DailyDoggy
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...
我正在为 iphone 寻找石英 2d 中的发光效果。我尝试用不同的 alpha 值制作线条来模拟发光,但它不起作用......
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 :(
ps 我正在制作一个应用程序,用户可以在其中使用发光绘图。我有基本的线条,但没有发光:(
采纳答案by hellphil
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
据我所知,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,章节:特殊注意事项
But there may be some other ways you could achieve your glow effect using shadows: Adding glowing effect to the circleI hope this helped, kind regards...
但是可能还有其他一些方法可以使用阴影来实现发光效果:向圆圈添加发光效果我希望这会有所帮助,亲切的问候...