private float getMatrixScaleFactor(Matrix transform) {
    transform.getValues(mTempValues);
    return mTempValues[Matrix.MSCALE_X];
  }
Gets the scale factor for the given matrix. This method assumes the equal scaling factor for X
and Y axis.
samples/zoomable/src/main/java/com/facebook/samples/zoomable/DefaultZoomableController.java