I'm moving a bitmap along a path on a Canvas. The path has various curves and the bitmap follows along. pm.getMatrix does a really lovely job of handling the position and rotation adjustments along the path when its passed the PathMeasure.POSITION_MATRIX_FLAG and TANGENT_MATRIX_FLAG, however, it rotates the bitmap pivoted on the 0,0 coordinate. I need it to pivot on the center of the bitmap.
I cracked open the matrix in the debugger, and it appears that there is indeed *no spoon. There is however 3 arrays of floats, each containing 3 floats. I'm guessing that if I can get those values, I can probably figure out which of them describes the rotation of the object, and there's probably some way to alter the pivot point? I see no other way to do it... Would love some guidance on at least what those three float arrays actually describe.
PathMeasure pm = new PathMeasure(playerPath, false);
float fSegmentLen = pm.getLength() / numSteps;
Matrix mxTransform = new Matrix();
pm.getMatrix(fSegmentLen * iCurStep, mxTransform,
PathMeasure.POSITION_MATRIX_FLAG + PathMeasure.TANGENT_MATRIX_FLAG );
canvas.drawBitmap(playerCar, mxTransform, null);