diff options
Diffstat (limited to 'core/java/android/widget/ImageView.java')
| -rw-r--r-- | core/java/android/widget/ImageView.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/core/java/android/widget/ImageView.java b/core/java/android/widget/ImageView.java index 041796b3e008..6d2f3686940d 100644 --- a/core/java/android/widget/ImageView.java +++ b/core/java/android/widget/ImageView.java @@ -687,12 +687,19 @@ public class ImageView extends View { return mDrawMatrix; } + /** + * Adds a transformation {@link Matrix} that is applied + * to the view's drawable when it is drawn. Allows custom scaling, + * translation, and perspective distortion. + * + * @param matrix the transformation parameters in matrix form + */ public void setImageMatrix(Matrix matrix) { - // collaps null and identity to just null + // collapse null and identity to just null if (matrix != null && matrix.isIdentity()) { matrix = null; } - + // don't invalidate unless we're actually changing our matrix if (matrix == null && !mMatrix.isIdentity() || matrix != null && !mMatrix.equals(matrix)) { |
