问题
i have 2 image views , the first imageview have bitmap with 600 px size second image view have 1024 px bitmap , and i am scaling rotating and moving first image view with matrix , once the user hit a button second image view should have the same size scale and rotation, but because the second imageview have a bigger bitmap i cannot just use
imageview2.setimagematrix(ImageView1Matrix)
it gives different results, is there anyway i can apply same operations(resize,rotate , translate) on the second imageview frim the first image view matrix?
iam currently trying this but only translate working, scale is not working and i dont know where to start to get the rotation value
float[] values = new float[9];
MIV1.getValues(values);
a.setTranslate(values[Matrix.MTRANS_X], values[Matrix.MTRANS_Y]);
*/
RectF r = new RectF();
MIV1.mapRect(r);
RectF drawableRect = new RectF(0, 0, 1024, 1024);
a.setRectToRect(drawableRect, r, Matrix.ScaleToFit.CENTER);
IV2.setImageMatrix(a);
来源:https://stackoverflow.com/questions/18426700/how-to-apply-matrix-on-a-different-size-bitmap