m.setRectToRect(inRect, outRect, Matrix.ScaleToFit.CENTER); float[] values = new float[9]; m.getValues(values);
matrix.set(savedMatrix); float scale = newDist / oldDist; matrix.getValues(matrixValues); float currentScale = matrixValues[Matrix.MSCALE_X];
Drawable drawable = myImageView.getDrawable(); //you should call after the bitmap drawn Rect bounds = drawable.getBounds(); int width = bounds.width(); int height = bounds.height(); Matrix m = new Matrix(); m.set(myImageView.getImageMatrix()); float[] values = new float[9]; m.getValues(values); int bitmapWidth = values[Matrix.MSCALE_X]*drawable.getIntrinsicWidth(); //your bitmap's width int bitmapHeight = values[Matrix.MSCALE_Y]*drawable.getIntrinsicHeight(); //your the bitmap's height
m.setRectToRect(inRect, outRect, Matrix.ScaleToFit.FILL); float[] values = new float[9]; m.getValues(values);
m.setRectToRect(inRect, outRect, Matrix.ScaleToFit.CENTER); float[] values = new float[9]; m.getValues(values);
RectF outRect = new RectF(0, 0, w, h); m.setRectToRect(inRect, outRect, Matrix.ScaleToFit.CENTER); m.getValues(values);
mMatrix.setRectToRect(src, dst, ScaleToFit.START); mMatrix.getValues(values); float sx = values[Matrix.MSCALE_X]; float sy = values[Matrix.MSCALE_Y];
float[] values = new float[9]; Matrix m = CoverPic.getImageMatrix(); m.getValues(values); float y = values[Matrix.MTRANS_Y]; float deltaY = lastY - event.getY();
m.setRectToRect(inRect, outRect, CENTER); float[] values = new float[9]; m.getValues(values);
m.getValues(tmp); for(float n : tmp)
matrix.getValues(mTmpValues); return mTmpValues[Matrix.MSCALE_X];
matrix.getValues(m); float transX = m[Matrix.MTRANS_X]; float transY = m[Matrix.MTRANS_Y];
matrix.getValues(m); float transX = m[Matrix.MTRANS_X]; float transY = m[Matrix.MTRANS_Y];
float r = newRot - d; float[] values = new float[9]; matrix.getValues(values); float tx = values[2]; float ty = values[5];
float r = newRot - d; float[] values = new float[9]; matrix.getValues(values); float tx = values[2]; float ty = values[5];