what is the difference between `Matrix.setRotate` and `Matrix.postRotate`

android, bitmap, java, matrix

Solution

From the API Reference, `setRotate` sets a particular absolute rotation (around either `(0,0)` or some other user-supplied point), while `postRotate` adds to the rotation of the matrix it is called on.

The question of which one should I use is best answered by trying each and seeing which one gives you the result that you want.

Problem

I'm trying to rotate a given bitmap using android Matrix object. I want to send it to rotated to my server and I'm using Android API8. Should i use `Matrix.setRotate` or `Matrix.postRotate` ? What is the difference between the two?

Original source