private void drawHook(Canvas canvas){
  Path hookPath=new Path();
  double sweepAngle=Math.PI / 180 * 180;
  float y=(float)Math.sin(sweepAngle) * (getBigCircleRadius()) + rectF.height() / 2;
  float x=(float)Math.cos(sweepAngle) * (getBigCircleRadius()) + rectF.width() / 2;
  float i=getBigCircleRadius() / 2;
  hookPath.addRoundRect(new RectF(i + i / 2,i + i / 2,i + i / 2 + 6,i + i + i / 2),3f,3f,Path.Direction.CCW);
  hookPath.addRoundRect(new RectF(i + i / 2,(i + i + i / 2) - 3f,i + i / 2 + i + i,i + i + i / 2 + 3f),3f,3f,Path.Direction.CCW);
  Matrix matrix=new Matrix();
  matrix.reset();
  int restoreCount=canvas.getSaveCount();
  hookPath.close();
  canvas.rotate(-45,rectF.centerX(),rectF.centerY());
  canvas.drawPath(hookPath,mHookPaint);
  canvas.restoreToCount(restoreCount);
}

private void drawHook ( Canvas canvas ) { Path hookPath = new Path ( ) ; double sweepAngle = Math . PI / 180 * 180 ; float y = ( float ) Math . sin ( sweepAngle ) * ( getBigCircleRadius ( ) ) + rectF . height ( ) / 2 ; float x = ( float ) Math . cos ( sweepAngle ) * ( getBigCircleRadius ( ) ) + rectF . width ( ) / 2 ; float i = getBigCircleRadius ( ) / 2 ; hookPath . addRoundRect ( new RectF ( i + i / 2 , i + i / 2 , i + i / 2 + 6 , i + i + i / 2 ) , 3f , 3f , Path . Direction . CCW ) ; hookPath . addRoundRect ( new RectF ( i + i / 2 , ( i + i + i / 2 ) - 3f , i + i / 2 + i + i , i + i + i / 2 + 3f ) , 3f , 3f , Path . Direction . CCW ) ; Matrix matrix = new Matrix ( ) ; matrix . reset ( ) ; int restoreCount = canvas . getSaveCount ( ) ; hookPath . close ( ) ; canvas . rotate ( - 45 , rectF . centerX ( ) , rectF . centerY ( ) ) ; canvas . drawPath ( hookPath , mHookPaint ) ; canvas . restoreToCount ( restoreCount ) ; }
there is some bug and it ' s not perfect . so we should improve this path for our projection
