How do I create some circle - like the one on the image - in Java, and in various colors?
I would like to make more of these circles to fly from specific position to random direction.
I don't know android specifically, but if you are using OpenGL ES, you can use a shader to make this work. First create a image like this in black color. Then use a color tint.
Now use a fragment shader to draw this texture. The code looks like this.
#ifdef GL_ES
precision mediump float;
#endif
varying vec2 texCoords;
uniform vec4 color;
uniform sampler2D image;
void main()
{
vec4 texel = texture2D(texCoords, image);
gl_FragColor = vec4(texel.rgb + color.rgb, texel.a * color.a);
}
This uses additive blending, and hence using an image with black color is very important. You can then draw this image using this shader at any scale you want.
Hope this helps.