O'Reilly logo

Graphics Programming with GDI+ by Mahesh Chand

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

11.7. Printing Graphics

We just saw how to print text files. Now let’s talk about how to print images and graphics items such as lines, rectangles, and ellipses. You probably have a pretty good idea how printing works. It’s all in the magic of the Graphics object available through PrintPageEventArgs. Once we have a printer’s Graphics object, we call draw and fill methods to print graphics items. In this section we will create an application that shows how to print simple graphics objects, including lines, curves, rectangles, and images.

Again, we create a Windows application and add a main menu to the form. We add four menu items to the main menu. The final form looks like Figure 11.13. As you might guess, the Draw Items and View Image menu ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required