#789 – How a Scale Transform Works

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:



About Sean
Software developer in the Twin Cities area, passionate about software development and sailing.

One Response to #789 – How a Scale Transform Works

  1. Pingback: #796 – WPF Transforms Use Homogeneous Coordinates | 2,000 Things You Should Know About WPF

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: