12.3. Transforms
Many drawing tasks can be made simpler with the use of a transform—an object that alters the way a shape or element is drawn by quietly shifting the coordinate system it uses. In WPF, transforms are represented by classes that derive from the abstract System.Windows.Media.Transform class, as listed in Table 12-5.
Name | Description | Important Properties |
---|---|---|
TranslateTransform | Displaces your coordinate system by some amount. This transform is useful if you want to draw the same shape in different places. | X, Y |
RotateTransform | Rotates your coordinate system. The shapes you draw normally are turned around a center point you choose. | Angle, CenterX, CenterY |
ScaleTransform | Scales your coordinate system up or down, so that ... |
Get Pro WPF in C# 2010: Windows Presentation Foundation in .NET 4 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.