我想绘制一个圆形视图,然后像这样设置我的画面:
mPaintForeground.setColor(mColorForeground);
mPaintForeground.setStyle(Paint.Style.STROKE);
mPaintForeground.setStrokeCap(Paint.Cap.ROUND);
mPaintForeground.setStrokeWidth(20);
mPaintForeground.setAntiAlias(true);
并绘制它:
mBitmap = Bitmap.createBitmap((int) mRect.width(), (int) mRect.height(),
Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(mBitmap);
if (!loadingFinished) {
canvas.drawArc(mRect, -90, mProgress, false, mPaintForeground);
}
但我发现一些观点的边缘已被切断
那么如何控制弧中的半径长度?是mRect中的问题吗?