I draw a filled path ( shape ) with
canvas.drawPath(mypath, paint);
This works fine. Now my Question:
I would like to have a special effect that the opacity of the color decreases to the border of the path ( shape ). So in the center of the shape the opacity will be 100% and to the borders the colors fade out to 0% ( 0 opacity )
Does anyone have a hint for me how to do this?
This isn’t doable unless path is a simple ellipse-like shape (in which case you can fill it with RadialGradient).
Another option is to set an inner blur MaskFilter to the paint like so:
In case of blur, results also highly depend on the path shape.