开发者

Android Neon Tubing

I want to know that is this possible to create neon affect in android as shown in image below

开发者_StackOverflow

Android Neon Tubing

I want to draw text using this affect in different colors is it possible


It is very easy to create it in bitmap images using glow effect with bright colours and placing it on a dark background.

Also it is easy to add glow like shadow to text using code like this

paint.setShadowLayer(float radius, float dx, float dy, int color)

or in xml file see example: Android - shadow on text?

However after experimenting, the text effects in android such as shadoLayer or

glowPaint.setMaskFilter(new BlurMaskFilter(20, Blur.NORMAL));

are not strong enough for a good neon effect, hence other apporaches may be needed. One is to create text as images in Photoshop, another is to process the text by drawing it into a separate bitmap and using various effects, scaling, alpha and Xfermodes to create a better neon effects.

EDIT: The way to do this is to create two paints: 1. neon bottom paint which should draw a blured line 2. neon top paint which will draw a white semi-transparent line of smaller line width than the bottom one.

Then draw the same line or path twice, using these paints, at the same coordinates.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜