I have the next set of values:
0.439353, -0.073688, 0.078788, 0.439353, 139.500000, 72.000000
Let's name the values: a, b, c, d, tx, ty
On the iOS version of the app, these values are sent to this object see here
In my Android app I'm trying something like this:
Matrix mtx = new Matrix();
mtx.setValues(new float[] { a, c, tx, b, d, ty, 0, 0, 1});
Taken from this post, in Android the Matrix object accepts the values in that order (a,c,tx,b,d,ty) and not like the iOS version (a,b,c,d,tx,ty).
My problem is that the rotation and scaling are done correctly, but I'm having problems with the translation part. It does not position it correctly on the screen. Anyone have any ideas what I am doing wrong?
EDIT I'm using the matrix to post a bitmap on a canvas, like so
protected void onDraw(Canvas canvas) {
// .....
canvas.drawBitmap(bmp, mtx, null);
}