Lines Matching full:matrix
21 import android.graphics.Matrix;
39 // This matrix is recomputed when we go from the thumbnail image to
41 protected Matrix mBaseMatrix = new Matrix();
46 // This matrix remains the same when we go from the thumbnail image
48 protected Matrix mSuppMatrix = new Matrix();
50 // This is the final matrix which is computed as the concatentation
51 // of the base matrix and the supplementary matrix.
52 private final Matrix mDisplayMatrix = new Matrix();
54 // Temporary buffer used for getting the values out of a matrix.
135 // This function changes bitmap, reset base matrix according to the size
136 // of the bitmap, and optionally reset the supplementary matrix.
178 Matrix m = getImageViewMatrix();
226 setScaleType(ImageView.ScaleType.MATRIX);
229 protected float getValue(Matrix matrix, int whichValue) {
230 matrix.getValues(mMatrixValues);
234 // Get the scale factor out of the matrix.
235 protected float getScale(Matrix matrix) {
236 return getValue(matrix, Matrix.MSCALE_X);
243 // Setup the base matrix so that the image is centered and scaled properly.
244 private void getProperBaseMatrix(RotateBitmap bitmap, Matrix matrix) {
250 matrix.reset();
258 matrix.postConcat(bitmap.getRotateMatrix());
259 matrix.postScale(scale, scale);
261 matrix.postTranslate((viewWidth - w * scale) / 2F, (viewHeight - h * scale) / 2F);
264 // Combine the base matrix and the supp matrix to make the final matrix.
265 protected Matrix getImageViewMatrix() {
266 // The final matrix is computed as the concatentation of the base matrix
267 // and the supplementary matrix.
275 // Sets the maximum zoom, which is a scale relative to the base matrix. It
361 Matrix tmp = new Matrix(mSuppMatrix);