在iPad App中绘制具有发光效果的线条 [英] Draw lines with Glow effect in iPad App

查看:161
本文介绍了在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()

记录这里

这篇关于在iPad App中绘制具有发光效果的线条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆