Transforms

A great deal of 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 secretly 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 13-3.

Table Transform Classes
NameDescriptionImportant Properties
TranslateTransformDisplaces your coordinate system by some amount. This transform is useful if you want to draw the same shape in different places.X, Y
RotateTransformRotates your coordinate system. The shapes you draw normally are turned around a center point you choose.Angle, CenterX, CenterY
ScaleTransformScales your coordinate system up or down, so that ...

Get Pro WPF in C# 2008: Windows Presentation Foundation with .NET 3.5, Second Edition 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.