4.3. Transformation with Pens

Transformation is the process of changing graphics objects from one state to another. Rotation, scaling, reflection, translation, and shearing are examples of transformation.

The Pen class provides methods for transformation and rotation. The RotateTransform method rotates a transformation by an angle. This method takes a rotation angle of type float. The second argument, MatrixOrder, is an optional parameter that provides an order for matrix transformation operations. The MatrixOrder enumeration defines the matrix order, which has two members: Append and Prepend. The matrix order is the order in which a matrix is multiplied with other matrices.

The difference between Append and Prepend is the order of the operation. ...

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.