private void drawLineProgress(Canvas canvas){
  float unitDegrees=(float)(2.0f * Math.PI / mLineCount);
  float outerCircleRadius=mRadius;
  float interCircleRadius=mRadius - mLineWidth;
  int progressLineCount=(int)((float)getProgress() / (float)getMax() * mLineCount);
  for (int i=0; i < mLineCount; i++) {
    float rotateDegrees=i * unitDegrees;
    float startX=mCenterX + (float)Math.sin(rotateDegrees) * interCircleRadius;
    float startY=mCenterX - (float)Math.cos(rotateDegrees) * interCircleRadius;
    float stopX=mCenterX + (float)Math.sin(rotateDegrees) * outerCircleRadius;
    float stopY=mCenterX - (float)Math.cos(rotateDegrees) * outerCircleRadius;
    if (i < progressLineCount) {
      canvas.drawLine(startX,startY,stopX,stopY,mProgressPaint);
    }
 else {
      canvas.drawLine(startX,startY,stopX,stopY,mProgressBackgroundPaint);
    }
  }
}

private void drawLineProgress ( Canvas canvas ) { float unitDegrees = ( float ) ( 2.0f * Math . PI / mLineCount ) ; float outerCircleRadius = mRadius ; float interCircleRadius = mRadius - mLineWidth ; int progressLineCount = ( int ) ( ( float ) getProgress ( ) / ( float ) getMax ( ) * mLineCount ) ; for ( int i = 0 ; i < mLineCount ; i ++ ) { float rotateDegrees = i * unitDegrees ; float startX = mCenterX + ( float ) Math . sin ( rotateDegrees ) * interCircleRadius ; float startY = mCenterX - ( float ) Math . cos ( rotateDegrees ) * interCircleRadius ; float stopX = mCenterX + ( float ) Math . sin ( rotateDegrees ) * outerCircleRadius ; float stopY = mCenterX - ( float ) Math . cos ( rotateDegrees ) * outerCircleRadius ; if ( i < progressLineCount ) { canvas . drawLine ( startX , startY , stopX , stopY , mProgressPaint ) ; } else { canvas . drawLine ( startX , startY , stopX , stopY , mProgressBackgroundPaint ) ; } } }
in the center of the drawing area as a reference point , rotate the canvas
