如何使用Core Graphics / Quartz 2D在iOS中制作圆锥形渐变? [英] How to make a conical gradient in iOS using Core Graphics / Quartz 2D?
本文介绍了如何使用Core Graphics / Quartz 2D在iOS中制作圆锥形渐变?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用Core Graphics / Quartz 2D API在iOS中绘制这样的锥形渐变?
How can I draw such a conical gradient in iOS using Core Graphics / Quartz 2D API?
Conical Gradient Sample http://ods.com.ua/win/eng/other/gimpdoc-html/painta27.gif
推荐答案
这种渐变风格没有Quartz函数。除非你准备深入研究它背后的数学,否则我建议你使用预先制作的图像。如果你只需要它用于不透明蒙版,这不是问题。
There is no Quartz function for this style of gradient. Unless you're ready to dig into mathematics behind it, I'd suggest you use pre-made images for this. It's not a problem if you need it only for opacity mask.
这篇关于如何使用Core Graphics / Quartz 2D在iOS中制作圆锥形渐变?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文