在iPad App中绘制具有发光效果的线条
问题描述:
我在我的应用程序中集成了绘制线我还没有使用 OpenGL
或任何其他类似的框架。
I have integrate draw line in my application i have not used OpenGL
or any other similar framework.
所以现在我想给他们的线条发光效果,所以我该如何给它?
So now i want to give glow effect to their lines so how can i give it ?
提前致谢。
答
将图形上下文中的阴影设置为零大小偏移,大约6-10的模糊(根据品味变化)和与笔触颜色相同的颜色。这将为所有后续绘图提供发光效果。该命令是
Set the shadow in your graphics context to have a zero size offset, a blur of around 6-10 (change according to taste) and the same colour as your stroke colour. This will give all subsequent drawing a glow effect. The command is
CGContextSetShadowWithColor()
记录这里。