docs: private void scale(int viewPortWidth, int viewPortHeight, int sourceWidth, int sourceHeight) {
  
      float inputRatio = ((float) sourceWidth) / sourceHeight;
      float outputRatio = ((float) viewPortWidth) / viewPortHeight;
  
      int scaledWidth = viewPortWidth;
      int scaledHeight = viewPortHeight;
      if (outputRatio > inputRatio) {
        // Not enough width to fill the output. (Black bars on left and right.)
        scaledWidth = (int) (viewPortHeight * inputRatio);
        scaledHeight = viewPortHeight;
      } else if (outputRatio < inputRatio) {
        // Not enough height to fill the output. (Black bars on top and bottom.)
        scaledHeight = (int) (viewPortWidth / inputRatio);
        scaledWidth = viewPortWidth;
      }
      float scale = scaledWidth / (float) sourceWidth;
  
      mMidX = ((viewPortWidth - scaledWidth) / 2f) / scale;
      mMidY = ((viewPortHeight - scaledHeight) / 2f) / scale;
    }