Home | History | Annotate | Download | only in widgets

Lines Matching refs:MATRIX

22 import android.graphics.Matrix;
44 // This matrix is recomputed when we go from the thumbnail image to
46 private Matrix mBaseMatrix = new Matrix();
51 // This matrix remains the same when we go from the thumbnail image
53 private Matrix mSuppMatrix = new Matrix();
55 // This is the final matrix which is computed as the concatenation
56 // of the base matrix and the supplementary matrix.
57 private final Matrix mDisplayMatrix = new Matrix();
59 // Temporary buffer used for getting the values out of a matrix.
87 setScaleType(ImageView.ScaleType.MATRIX);
98 setScaleType(ImageView.ScaleType.MATRIX);
110 setScaleType(ImageView.ScaleType.MATRIX);
179 * @param resetSupp true to reset the transform matrix
247 return getValue(mSuppMatrix, Matrix.MSCALE_X);
258 * Setup the base matrix so that the image is centered and scaled properly.
261 * @param matrix The matrix
263 private void getProperBaseMatrix(Bitmap bitmap, Matrix matrix) {
269 matrix.reset();
277 matrix.postScale(scale, scale);
278 matrix.postTranslate((viewWidth - w * scale) / 2F, (viewHeight - h * scale) / 2F);
280 matrix.postTranslate((viewWidth - w) / 2F, (viewHeight - h) / 2F);
285 * Combine the base matrix and the supp matrix to make the final matrix.
287 private Matrix getImageViewMatrix() {
288 // The final matrix is computed as the concatenation of the base matrix
289 // and the supplementary matrix.
303 * Sets the maximum zoom, which is a scale relative to the base matrix. It
321 * Sets the maximum zoom, which is a scale relative to the base matrix. It
457 Matrix tmp = new Matrix(mSuppMatrix);
460 if (getValue(tmp, Matrix.MSCALE_X) < 1F) {
482 final Matrix m = getImageViewMatrix();
520 * Get a matrix transform value
522 * @param matrix The matrix
526 private float getValue(Matrix matrix, int whichValue) {
527 matrix.getValues(mMatrixValues);