Ejemplo n.º 1
0
  @Override
  public boolean setDisplayMatrix(Matrix finalMatrix) {
    if (finalMatrix == null) throw new IllegalArgumentException("Matrix cannot be null");

    ImageView imageView = getImageView();
    if (null == imageView) return false;

    if (null == imageView.getDrawable()) return false;

    mSuppMatrix.set(finalMatrix);
    setImageViewMatrix(getDrawMatrix());
    checkMatrixBounds();

    return true;
  }
Ejemplo n.º 2
0
 /** Resets the Matrix back to FIT_CENTER, and then displays it.s */
 private void resetMatrix() {
   mSuppMatrix.reset();
   setImageViewMatrix(getDrawMatrix());
   checkMatrixBounds();
 }
Ejemplo n.º 3
0
 /** Helper method that simply checks the Matrix, and then displays the result */
 private void checkAndDisplayMatrix() {
   if (checkMatrixBounds()) {
     setImageViewMatrix(getDrawMatrix());
   }
 }