code: protected boolean calculateZoomToPointTransform(
        Matrix outTransform,
        float scale,
        PointF imagePoint,
        PointF viewPoint,
        @LimitFlag int limitFlags) {
      float[] viewAbsolute = mTempValues;
      viewAbsolute[0] = imagePoint.x;
      viewAbsolute[1] = imagePoint.y;
      mapRelativeToAbsolute(viewAbsolute, viewAbsolute, 1);
      float distanceX = viewPoint.x - viewAbsolute[0];
      float distanceY = viewPoint.y - viewAbsolute[1];
      boolean transformCorrected = false;
      outTransform.setScale(scale, scale, viewAbsolute[0], viewAbsolute[1]);
      transformCorrected |= limitScale(outTransform, viewAbsolute[0], viewAbsolute[1], limitFlags);
      outTransform.postTranslate(distanceX, distanceY);
      transformCorrected |= limitTranslation(outTransform, limitFlags);
      return transformCorrected;
    }
docs: Calculates the zoom transformation that would zoom to the desired scale and position the image
  so that the given image point corresponds to the given view point.
  
  @param outTransform the matrix to store the result to
  @param scale desired scale, will be limited to {min, max} scale factor
  @param imagePoint 2D point in image's relative coordinate system (i.e. 0 <= x, y <= 1)
  @param viewPoint 2D point in view's absolute coordinate system
  @param limitFlags whether to limit translation and/or scale.
  @return whether or not the transform has been corrected due to limitation