private void drawCorners(Canvas canvas) {
    if (mBorderCornerPaint != null) {

      float lineWidth = mBorderPaint != null ? mBorderPaint.getStrokeWidth() : 0;
      float cornerWidth = mBorderCornerPaint.getStrokeWidth();

      // for rectangle crop shape we allow the corners to be offset from the borders
      float w =
          cornerWidth / 2
              + (mCropShape == CropImageView.CropShape.RECTANGLE ? mBorderCornerOffset : 0);

      RectF rect = mCropWindowHandler.getRect();
      rect.inset(w, w);

      float cornerOffset = (cornerWidth - lineWidth) / 2;
      float cornerExtension = cornerWidth / 2 + cornerOffset;

      // Top left
      canvas.drawLine(
          rect.left - cornerOffset,
          rect.top - cornerExtension,
          rect.left - cornerOffset,
          rect.top + mBorderCornerLength,
          mBorderCornerPaint);
      canvas.drawLine(
          rect.left - cornerExtension,
          rect.top - cornerOffset,
          rect.left + mBorderCornerLength,
          rect.top - cornerOffset,
          mBorderCornerPaint);

      // Top right
      canvas.drawLine(
          rect.right + cornerOffset,
          rect.top - cornerExtension,
          rect.right + cornerOffset,
          rect.top + mBorderCornerLength,
          mBorderCornerPaint);
      canvas.drawLine(
          rect.right + cornerExtension,
          rect.top - cornerOffset,
          rect.right - mBorderCornerLength,
          rect.top - cornerOffset,
          mBorderCornerPaint);

      // Bottom left
      canvas.drawLine(
          rect.left - cornerOffset,
          rect.bottom + cornerExtension,
          rect.left - cornerOffset,
          rect.bottom - mBorderCornerLength,
          mBorderCornerPaint);
      canvas.drawLine(
          rect.left - cornerExtension,
          rect.bottom + cornerOffset,
          rect.left + mBorderCornerLength,
          rect.bottom + cornerOffset,
          mBorderCornerPaint);

      // Bottom left
      canvas.drawLine(
          rect.right + cornerOffset,
          rect.bottom + cornerExtension,
          rect.right + cornerOffset,
          rect.bottom - mBorderCornerLength,
          mBorderCornerPaint);
      canvas.drawLine(
          rect.right + cornerExtension,
          rect.bottom + cornerOffset,
          rect.right - mBorderCornerLength,
          rect.bottom + cornerOffset,
          mBorderCornerPaint);
    }
  }
Draw the corner of crop overlay.
core/src/main/java/com/theartofdev/edmodo/cropper/CropOverlayView.java