@Nullable
  public static ScaleType convertFromImageViewScaleType(ImageView.ScaleType scaleType) {
    switch (scaleType) {
      case CENTER:
        return ScaleType.CENTER;
      case CENTER_CROP:
        return ScaleType.CENTER_CROP;
      case CENTER_INSIDE:
        return ScaleType.CENTER_INSIDE;
      case FIT_CENTER:
        return ScaleType.FIT_CENTER;
      case FIT_START:
        return ScaleType.FIT_START;
      case FIT_END:
        return ScaleType.FIT_END;
      case FIT_XY:
        return ScaleType.FIT_XY;
      // Matrix is not supported
      case MATRIX:
      default:
        return null;
    }
  }
Gets transformation matrix based on the scale type.

@param outTransform out matrix to store result
@param parentBounds parent bounds
@param childWidth child width
@param childHeight child height
@param focusX focus point x coordinate, relative [0...1]
@param focusY focus point y coordinate, relative [0...1]
@return same reference to the out matrix for convenience
ui-core/src/main/java/com/facebook/drawee/drawable/ScalingUtils.java