saveLayer:https://blog.csdn.net/u010852160/article/details/72918551
知识点:saveLayer 建立新的图层 进行绘制
代码段
int layer;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
layer = canvas.saveLayer(0, 0, getWidth(), getHeight(), null);
} else {
layer = canvas.saveLayer(0, 0, getWidth(), getHeight(), null, Canvas.ALL_SAVE_FLAG);
}
canvas.drawBitmap(mBackground, 0, 0, null);
canvas.drawCircle(mStartX, mStartY, mCurrentRadius, mPaint);
canvas.restoreToCount(layer);
save : https://blog.csdn.net/lijiuche/article/details/53467844
save 是在相同的图层进行绘制