I have an image that I want to rotate, like a watch hand. The problem is that no matter what I'm putting in the pivot point (in the matrix.setrotate) is still rotated the same. Here is my code:
c = holder.lockCanvas();
matrix.setRotate((float) degre * 4, 500, 500);
Bitmap to_rotate = Bitmap.createBitmap(watch_hand, 0, 0, watch_hand.getWidth(), watch_hand.getHeight(), matrix, false);
c.drawARGB(255, 255, 255, 255);
c.drawBitmap(background, 0, 0, null);
c.drawBitmap(to_rotate, CENTER_X - 20 , CENTER_Y - height / 2 + 20, null);
holder.unlockCanvasAndPost(c);
What can I do?
I want the image to rotate at "CENTER_X, CENTER_Y.