docs: @Override
      protected void onDraw(Canvas canvas) {
          super.onDraw(canvas);
  
          float drawPercent = percent;
  
          canvas.save();
  
  
          final int height = getMeasuredHeight() - getPaddingTop() - getPaddingBottom();
          final int width = getMeasuredWidth() - getPaddingLeft() - getPaddingRight();
  
          float fillWidth = drawPercent * width;
          final float radius = height / 2.0f;
  
  
          rectF.left = 0;
          rectF.top = 0;
          rectF.right = width;
          rectF.bottom = height;
  
  //        regionPath.reset();
  //        regionPath.addRoundRect(rectF, radius, radius, Path.Direction.CW);
  //        regionPath.close();
          // draw background
          if (backgroundColor != 0) {
              canvas.drawRoundRect(rectF, radius, radius, backgroundPaint);
  //            canvas.drawPath(regionPath, backgroundPaint);
          }
  
  
          // draw fill
          try {
  
  
              if (fillColor != 0 && fillWidth > 0) {
                  //有锯齿, 无奈放弃
  //            fillPath.reset();
  //            rectF.right = fillWidth;
  //            fillPath.addRect(rectF, Path.Direction.CW);
  //            fillPath.close();
  //            canvas.clipPath(regionPath);
  //            canvas.drawPath(fillPath, fillPaint);
                  if (fillWidth == width) {
                      rectF.right = fillWidth;
                      canvas.drawRoundRect(rectF, radius, radius, fillPaint);
                      return;
                  }
  
                  if (isFlat) {
  
                      // draw left semicircle
                      canvas.save();
                      rectF.right = fillWidth > radius ? radius : fillWidth;
                      canvas.clipRect(rectF);
                      rectF.right = radius * 2;
                      canvas.drawRoundRect(rectF, radius, radius, fillPaint);
                      canvas.restore();
  
                      if (fillWidth <= radius) {
                          return;
                      }
  
                      float leftAreaWidth = width - radius;
                      // draw center
                      float centerX = fillWidth > leftAreaWidth ? leftAreaWidth : fillWidth;
                      rectF.left = radius;
                      rectF.right = centerX;
                      canvas.drawRect(rectF, fillPaint);
                      if (fillWidth <= leftAreaWidth) {
                          return;
                      }
  
                      // draw right semicircle
                      rectF.left = leftAreaWidth - radius;
  
                      rectF.right = fillWidth;
                      canvas.clipRect(rectF);
  
                      rectF.right = width;
                      canvas.drawArc(rectF, -90, 180, true, fillPaint);
  
                  } else {
  
                      if (fillWidth <= radius * 2) {
                          rectF.right = fillWidth;
                          canvas.clipRect(rectF);
                          rectF.right = radius * 2;
                          canvas.drawRoundRect(rectF, radius, radius, fillPaint);
                      } else {
                          rectF.right = fillWidth;
                          canvas.drawRoundRect(rectF, radius, radius, fillPaint);
                      }
                  }
  
              }
          } finally {
              canvas.restore();
          }
      }