0
我有一張我想旋轉的圖像,就像手錶一樣。問題在於,無論我把什麼放在軸點(在matrix.setrotate中)仍然旋轉相同。這裏是我的代碼:圍繞一個軸旋轉圖像
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);
我該怎麼辦?
我想要的形象,在「CENTER_X旋轉,CENTER_Y