5.8. Transforming Text

Transformation is a process of moving objects from one place to another by applying a series of operations such as scaling, rotation, and translation. In this section we will see how to transform text using the Graphics object.

Transformation using Graphics class methods and properties is pretty simple. The Graphics class provides the methods ScaleTransform, RotateTransform, TranslateTransform and others.

Note

See Chapter 10 for detailed information about transformations and how to use various transformation techniques.

Let’s look at a simple yet useful example of text transformation. First we draw some text on a form using the code in Listing 5.18.

Listing 5.18. Drawing text on a form
 Graphics g = e.Graphics; string ...

Get Graphics Programming with GDI+ 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.