How to draw an arc using a shader like SweepGradient?
In the examples that I have, there is a Paint object:
Paint lightRed = new Paint();
lightRed.setAntiAlias(true);
lightRed.setStyle(Style.STROKE);
lightRed.setStrokeWidth(12);
lightRed.setColor(0xFFCC0000);
...
canvas.drawArc(rectf, -90, 360, false, lightRed);
Do not think that it matters, but I use it to draw as a desktop widget.
source
share