Coordinate transformation matrix is a 3*3 matrix, used to coordinate changes to the graph, the original coordinate points transferred to the new coordinate point, because a picture is a bit of the array and the color information on each point, so the transformation of the coordinates, is to move each point to form a new picture. Specifically, zooming in and out, moving, rotating, pivoting, and twisting these effects can all be done with this matrix.
The transformation formula for the angle of θ rotation counterclockwise around the origin is X ' = xcosθ? ysinθ and Y. ' = xsinθ+ ycosθ
See Code: http://download.csdn.net/detail/jarlen/8564513
- About Android in implementation
The Matrix class can be found, in fact, that the Matrix class itself has provided many similar methods that we can just invoke.
Setscale (float sx, float sy, float px, float py) Zoom in
Setskew (float KX, Float KY, float px, float py) chamfered
Settranslate (float dx, float dy) pan
SetRotate (float degrees, float px, float py) rotation
Image processing---about pixel coordinate matrix transformations (translation, rotation, scaling, error cutting)