You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$10
For Premium members:
This article shows you how to use GDI+ classes defined in the .NET Framework class library to apply transformations on text.
In Chapter 5, we discussed how to use the ScaleTransform, RotateTransform, and TranslateTransform methods to transform text. We can also use a transformation matrix to transform text.
We create a Matrix object with the transformation properties and apply it on the surface using the Transform property of the Graphics object. Listing 10-19 creates a Matrix object and sets it as the Transform property. We then call DrawString, which draws the text on the form. To test this code, add the code to a Form's paint event handler.
Graphics g = e.Graphics;
Listing 10-19 Generates Figure 10-29.
You can apply shearing and other effects by changing the values of Matrix. For example, if you change Matrix as follows:
Matrix M =
Figure 10-30. Transforming Text
We can reverse the text by just changing the value of the Matrix object as follows:
This articles is taken from Chapter 10 "Transformations" of Graphics Programming with GDI+.
Hands on ASP.NET GridView