The documentation is pretty vague as to what is actually happening when these methods are used. Can someone explain how Matrix actually affects the Bitmap that it’s being set to? They use the term concatenate in there, but I’m unclear on how that term applies to coordinate data (having only used it in regard to string manipulation before).
The documentation is pretty vague as to what is actually happening when these methods
Share
The set-methods will replace the current Matrix with new values, disregarding whatever the Matrix contained before. The pre and post method will apply a new transformation before or after whatever the current Matrix contains.
In this example, the rotation will be ignored since we are using the set method and the m will only contain a translation:
In this example, the final matrix will be a translation followed by a rotation:
In the final example, the final matrix will be a rotation followed by a translation:
There is some more information in this (rather lengthy) post:
https://medium.com/a-problem-like-maria/understanding-android-matrix-transformations-25e028f56dc7
Hope it helps.