title: Rotate a sprite in game android
body: <p>I want implement move a sprite from position (x ,y ) to position action_down (x1 , y1) .But I can't rotate it .Please help me .Thanks</p>
  
  <p>This is my code:</p>
  
  <pre><code>public Sprite(GameView gameView, Bitmap bmp) {
  
        this.gameView = gameView;
        this.bmp = bmp;
        this.width = bmp.getWidth() / BMP_COLUMNS;// create width, height
        this.height = bmp.getHeight() / BMP_ROWS;
        Random rnd = new Random(System.currentTimeMillis());
        x = rnd.nextInt(gameView.getWidth() - bmp.getWidth());
        y = rnd.nextInt(gameView.getHeight() - bmp.getHeight());
  }
  
  public void onDraw(Canvas canvas) {
  
              Matrix matrix = new Matrix();
              matrix.postTranslate(x, y);
              float dx = x1-x;
      float dy = y1-y;
      float d = (float)Math.sqrt(dx*dx+dy*dy);
      vx = (float) (dx*5/d)/3 ;
      vy = (float) (dy*5/d)/3 ;
      if(k==1){
      x += vx ;
      y += vy ;
      }
      currentFrame = ++currentFrame % BMP_COLUMNS;
      int srcX = currentFrame * width;
      int srcY = 0 * height;
      Rect src = new Rect(srcX, srcY, srcX + width, srcY + height);
      Rect dst = new Rect(x, y, x + width, y + height);
      canvas.drawBitmap(bmp, src, dst, null);
  }
  </code></pre>