Chapter 27. Working with XImages and Colormaps

In this chapter

  • Printing the Canvas

  • Creating an XImage

  • Creating a PostScript Prolog

  • Parsing the X Colormap

  • Writing the PostScript Page Definition File

  • Directing the Output to a Printer or File

  • Next Steps

The introduction to the PostScript page description language provided by the preceding chapters has prepared you for implementing print capability in the Graphics Editor project.

To accomplish this, it is necessary to create an XImage of the drawing area window and parse the image data to form a digitized raster image understandable by PostScript.

The next section introduces the gx_print function defined as the control action for the print icon of the application's menu panel.

Note

The code introduced in this ...

Get X Window Programming from Scratch 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.