title: understanding usage of ImageView Matrix
body: <p>I know that SO is full of Matrix questions, but I can't find a question where it is fully explained. I guess that any ImageView has a Matrix which is responsible for scaling, rotating and the position. 
  But why I can't rotate an Image using a Matrix like this:</p>
  
  <pre><code>ImageView img = (ImageView)findViewById(R.id.some_imageview);
  img.setScaleType(ScaleType.Matrix);
  Rect bounds = img.getDrawable.getBounds();
  img.getImageMatrix().postRotate(180f, bounds.width() / 2, bounds.height() / 2);
  </code></pre>
  
  <p>several answers suggest to do it like this:</p>
  
  <pre><code>ImageView img = (ImageView)findViewById(R.id.some_imageview);
  img.setScaleType(ScaleType.Matrix);
  Rect bounds = img.getDrawable.getBounds();
  Matrix rotationMatrix = new Matrix();
  rotationMatrix.postRotate(180f, bounds.width() / 2, bounds.height() / 2);
  img.setImageMatrix(rotationMatrix);
  </code></pre>
  
  <p>WHY I have to create a new Matrix every time I want to rotate? Furthermore, If I set the Matrix from the second example, Why it isn't rotating again (to its original degree) if I set the <code>rotationMatrix</code> again? If I want to get the original degree I can set a plain constructed Matrix. but Again, I do NOT understand why</p>
  
  <pre><code>img.getImageMatrix().postRotate(180f, bounds.width() / 2, bounds.height() / 2); 
  </code></pre>
  
  <p>will not work. </p>
  
  <p>Note: I have also tried the <code>setRotate</code> method without observing any difference </p>
  
  <p>EDIT: due to a comment</p>
  
  <p>I have asked Why I have to create a new Matrix everytime, which implies the question, why I cannot use the Matrix in place. 
  Also What I suspect to work was this (which actually won't, too):</p>
  
  <pre><code>ImageView img = (ImageView)findViewById(R.id.some_imageview);
  img.setScaleType(ScaleType.Matrix);
  Rect bounds = img.getDrawable.getBounds();
  Matrix rotationMatrix = new Matrix();
  rotationMatrix.postRotate(180f, bounds.width() / 2, bounds.height() / 2);
  img.setImageMatrix(rotationMatrix);
  //works until here. 
  
  //Then after that successful call
  
   //assumed to get my Matrix back, which is rotated by 180 degrees
  
   Matrix matrix = img.getImageMatrix();
   Rext bounds = img.getDrawable().getBounds()
   //rotate again at 90 degree. It should be now rotated 270 degrees (180 from before, plus 90 now)
   matrix.postRotate(90f, bounds.width() / 2, bounds.height() / 2);
   //unfortunately NO effect!
   img.setImageMatrix(matrix);
  </code></pre>