#789 – How a Scale Transform Works
April 2, 2013 1 Comment
A 2D scale 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 scaling 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 scaling looks like:
Where Sx and Sy represent the ScaleX and ScaleY properties of the ScaleTransform, respectively.
This leads to the equations:
Pingback: #796 – WPF Transforms Use Homogeneous Coordinates | 2,000 Things You Should Know About WPF