xxxxxxxxxx
Matrix rotator = new Matrix();
// rotate around (0,0)
rotator.postRotate(90);
// or, rotate around x,y
// NOTE: coords in bitmap-space!
int xRotate =
int yRotate =
rotator.postRotate(90, xRotate, yRotate);
// to set the position in canvas where the bitmap should be drawn to;
// NOTE: coords in canvas-space!
int xTranslate =
int yTranslate =
rotator.postTranslate(xTranslate, yTranslate);
canvas.drawBitmap(bitmap, rotator, paint);