Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我以以下方式拖动图像视图。
matrix.postTranslate(a,b); ImageView.setImageMatrix(matrix);
我想找到值a和b. 我可以得到 ImageView.getImageMatrix,但是如何找到翻译的方式?
a
b
利用
float[] values = new float[9]; matrix.getValues(values);
values 数组现在将保存翻译浮点数。x 翻译是
values[Matrix.MTRANS_X]
y 翻译是
values[Matrix.MTRANS_Y]