动态生成具有发光效果的线条
我想画这样的带有发光效果的线
问题 - 我必须根据用户的交互在程序中生成此行(行的形式将在 onTouchEvent
- ACTION_MOVE
中生成)。
我可以在没有 xml 文件或绘制 premaid 位图的情况下生成此效果吗?
I want to draw line with glow effect like this
The problem - i must generate this line in program in dependence on user's interaction ( the form of line will be generated in onTouchEvent
- ACTION_MOVE
).
Can i generate this effect without xml files or drawing premaid bitmap ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我以这种方式模仿这种效果:
BlurMaskFilter
画线;我使用 Path 类生成线条并保存 MOVE_ACTION 事件的坐标,以仅生成我需要的路径的一部分。
创建 2 个
Paint()
:并绘制两次我的
Path()
:I imitate this effect in this way :
BlurMaskFilter
;I use Path class to generate line and save coordinates of
MOVE_ACTION
event to generate only part of path what i need.Create 2
Paint()
s:And draw twice my
Path()
: