@Override
    @TargetApi(Build.VERSION_CODES.HONEYCOMB)
    public boolean onScale(ScaleGestureDetector detector) {
      RectF rect = mCropWindowHandler.getRect();

      float x = detector.getFocusX();
      float y = detector.getFocusY();
      float dY = detector.getCurrentSpanY() / 2;
      float dX = detector.getCurrentSpanX() / 2;

      float newTop = y - dY;
      float newLeft = x - dX;
      float newRight = x + dX;
      float newBottom = y + dY;

      if (newLeft < newRight
          && newTop <= newBottom
          && newLeft >= 0
          && newRight <= mCropWindowHandler.getMaxCropWidth()
          && newTop >= 0
          && newBottom <= mCropWindowHandler.getMaxCropHeight()) {

        rect.set(newLeft, newTop, newRight, newBottom);
        mCropWindowHandler.setRect(rect);
        invalidate();
      }

      return true;
    }
Handle scaling the rectangle based on two finger input
core/src/main/java/com/theartofdev/edmodo/cropper/CropOverlayView.java