How to show a shaded glow outside a circle in android - android

How to show a shaded glow blended with the background color when you draw a circle on a canvas in android.
My circle is orange colored and the background is blue. I am trying to show a halo of white color which fades to the background color

Related

How would you do this in canvas drawing

How would you draw something like this programmatically in a ondraw method? I know how to draw lines or squares, but to have an image inside a squarebox that has an arrow, is kind of confusing for me
Thank you
Just break the drawing up in different elements:
a gray box
a white rounded rectangle
a white rectangle
a blue rectangle
a blue rounded rectangle
a blue triangle
a red heart (I would just try to find a font with a nice heart)
the text in white.
Draw it all to the canvas in this order and you are fine.

Custom PieProgress in android

Hi i want to draw a PieProgress like an attached image.
Any Suggestion ?
I can draw this Progress but how can i place this parallel image on the center of this progress bar.
what is the problem here?
draw image in center:
Drawable d = getResources().getDrawable(R.drawable.your_drawable);
d.setBounds(left, top, right, bottom);
d.draw(canvas);
user drawArc for progress, draw one with 360 degrees and another according progress with smaller thickness over it with black color and one more for left space with white color.
or draw two with different radius with black color and then one more with proper angle that will show progress, also with black color or whatever.

Canvas drawText with gradient color

Is that possible to draw text on Canvas with gradient color in Andorid?
For example, draw letter A with top part is red while bottom part is blue?
Thanks

Earse painting using PorterDuffXfermode with transparent color

I am doing finger paint app.In that i need earse functionality for drawn paths.Every thing is working fine by using
PorterDuffXfermode(PorterDuff.Mode.CLEAR)
The only thing is it showing black color while it earsing.Is it possible to change it to some transparent color.

Android, canvas: How can I draw transparent circle without overprinting?

Stage 1. I have a background
Stage 2. I apply an overlay to background with a canvas to draw. First I fill the whole area with canvas.drawColor(Color.argb(128,0,0,0))
Then I need to draw a red transparent circle with color.argb(128,255,0,0) at a specified place, but I want circle red transparency replaced black filling transparency, not added. So, I wanna get this
but NOT this
How can I get it?
You can try to use Canvas.clipPath before filling area with black color to exclude area, which will be used later by circle.

Categories

Resources