Transformations

In the previous section, we saw how we could enlarge an image based on the dimensions of a rectangle. This was a kind of a transformation. Transformations not only allow us to scale images, but also rotate, flip, and skew them. In drawing applications, you oftentimes need to enlarge an image to fill an area. Or you may have to rotate an arrow in a flow chart to point at a given process. This is all done through transformation.

Origins

As we stated earlier, by default GDI+ sets the upper-left corner of our drawing surface as the origin. But suppose that we want items stored in the world coordinate space to be output to a different section of the screen. For instance, suppose you have three line segments stored in a GraphicsPath ...

Get Visual Basic® Programmer's Guide to the .NET Framework Class Library 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.