docs: private boolean limitTranslation(Matrix transform, @LimitFlag int limitTypes) {
      if (!shouldLimit(limitTypes, LIMIT_TRANSLATION_X | LIMIT_TRANSLATION_Y)) {
        return false;
      }
      RectF b = mTempRect;
      b.set(mImageBounds);
      transform.mapRect(b);
      float offsetLeft = shouldLimit(limitTypes, LIMIT_TRANSLATION_X) ?
          getOffset(b.left, b.right, mViewBounds.left, mViewBounds.right, mImageBounds.centerX()) : 0;
      float offsetTop = shouldLimit(limitTypes, LIMIT_TRANSLATION_Y) ?
          getOffset(b.top, b.bottom, mViewBounds.top, mViewBounds.bottom, mImageBounds.centerY()) : 0;
      if (offsetLeft != 0 || offsetTop != 0) {
        transform.postTranslate(offsetLeft, offsetTop);
        return true;
      }
      return false;
    }