-1

Possible Duplicate:
Android - Rotate Dial
Android - Rotate image around center point?

How can I rotate a bitmap (not a view or canvas) around its center point when the user touches it and drags it?

I have tried loads of examples on stack overflow and none appear to work.

So far I have:

double r = Math.atan2(posX - dial.getWidth() / 2, dial.getHeight() / 2 - posY);
rotation = (int) Math.toDegrees(r);
Community
  • 1
  • 1
JeffLemon
  • 281
  • 3
  • 6
  • 14
  • 2
    Why are you asking the same question four times? http://stackoverflow.com/questions/7490277/android-rotate-dial http://stackoverflow.com/questions/7491148/android-rotate-image-around-center-point http://stackoverflow.com/questions/7491579/android-rotate-image-around-center-point – nhaarman Sep 20 '11 at 21:22

0 Answers0