Printing in 3D

Printing the contents of a Viewport3D is almost ridiculously easy. In the Windows Presentation Foundation, printing is based on objects of type Visual. Visual is the base class to UIElement, which is the base class to FrameworkElement, which is the base class to Viewport3D, so a Viewport3D certainly qualifies. If all you want to do is print a single Viewport3D object on a printer page, the job is as easy as creating an object of type PrintDialog and calling the PrintVisual method. Printing multiple pages is a bit tougher; see Chapter 17 of my book Applications = Code + Markup for details.

What you'll find, however, is that you're really printing the contents of the Viewport3D object, and that can actually be a problem. Let's look ...

Get 3D Programming for Windows® now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.