#790 – How a Rotation Transform Works
April 3, 2013 2 Comments
A 2D rotation transform in WPF is accomplished by using a transformation matrix. The transformation matrix is multiplied by another matrix representing a single 2D point to be transformed. The resulting matrix describes the transformed point. When rotating a user interface element, this transformation is done individually on each point to generate the set of points representing the transformed element.
The transformation operation for rotation looks like:
Where ϴ represents the Angle property of the ScaleTransform, indicating the number of degrees to rotate the point in a clockwise direction.
This leads to the equations:
Pingback: Dew Drop – April 3, 2013 (#1,519) | Alvin Ashcraft's Morning Dew
Pingback: #796 – WPF Transforms Use Homogeneous Coordinates | 2,000 Things You Should Know About WPF