(startMatrix != null && startMatrix.equals(endMatrix));
if (startMatrix.equals(endMatrix)) { return null;
@Override public void setImageMatrix(Matrix matrix) { Matrix current = getImageMatrix(); boolean needUpdate = false; if (matrix == null && !current.isIdentity() || matrix != null && !current.equals(matrix)) { needUpdate = true; } super.setImageMatrix(matrix); if (needUpdate) { onImageMatrixChanged(); } }
@Override protected void onLayout(boolean changed, int left, int top, int right, int bottom){ Matrix targetMatrix = getImageMatrix(); if(targetMatrix != null){ if(!targetMatrix.equals(mProgressiveMatrix)){ if(mIgnoreMatrixAnimation){ mProgressiveMatrix = new Matrix(targetMatrix); }else{ mAnimationMark = true; } } } }
/** * set current state, get and save the internal Matrix int super class * @param state: -1/STATE_NON/STATE_DRAGING/STATECHECKING * /STATE_ZOOMING/STATE_ROTATING */ private final void setState(final int state) { if (mState != state) { mState = state; // get and save the internal Matrix of super class getTransform(mSavedImageMatrix); if (!mImageMatrix.equals(mSavedImageMatrix)) { mImageMatrix.set(mSavedImageMatrix); mImageMatrixChanged = true; } } }
if(existing.equals(mat)) return; mats.remove(index);
@Override public void setImageMatrix(Matrix matrix) { Matrix current = getImageMatrix(); boolean needUpdate = false; if (matrix == null && !current.isIdentity() || matrix != null && !current.equals(matrix)) { needUpdate = true; } super.setImageMatrix(matrix); if (needUpdate) onImageMatrixChanged(); }
@Override public void setImageMatrix(Matrix matrix) { Matrix current = getImageMatrix(); boolean needUpdate = false; if (matrix == null && !current.isIdentity() || matrix != null && !current.equals(matrix)) { needUpdate = true; } super.setImageMatrix(matrix); if (needUpdate) onImageMatrixChanged(); }
@Override public void setImageMatrix(Matrix matrix) { Matrix current = getImageMatrix(); boolean needUpdate = false; if (matrix == null && !current.isIdentity() || matrix != null && !current.equals(matrix)) { needUpdate = true; } super.setImageMatrix(matrix); if (needUpdate) onImageMatrixChanged(); }