Hardcopy


Overview

Hardcopy output functions are provided for the widgets and objects defined in the ChartObject library. Using the supplied functions, an application can produce a file containing a PostScript or CGM representation of a single widget (and all the graphic objects displayed inside) or a composite of several widgets. Once the PostScript or CGM file is generated, you can use your local print/plot utilities to produce the hardcopy output.

All the functions related to hardcopy output are defined in the CompBase widget class. See the CompBase reference pages for a complete description of those functions.


PostScript Output

Function XintOutputPostscript outputs a scaled monochrome or color encapsulated PostScript description of an INT widget or a container widget such as a Form or a RowColumn widget, containing multiple INT widgets, and of all of the graphic objects contained inside. It produces an image preserving the relative layout of the child widgets. In addition to INT widgets, Motif Label, Text and TextField widgets are also recognized and output.

Function XintOutputMontagePostscript also outputs a PostScript representation of a combination of INT widgets or classes which are derived from EditObject (EditTable for example). This function lets the application position each widget in the output display manually.

Before requesting the PostScript output function, you can use function XintPostScriptSetDefaults to define the characteristics (height, width, resolution) of the page to be output. By default the widget background is not painted. To specify a background color, use the function XintPostscriptSetBackground. The PostScript output function will produce a multi-page output display when the scale_factor argument in the function call is greater than one.

The diagram below illustrates an example of layout handled by the composite hardcopy output.


Figure 19: Composite layout example.


Figure 20: Composite PostScript output example.

Function XintOutputMontagePostscript accepts a list of EditObject based widgets, as well as a list of coordinate specifications. This function allows the application to specify the layout of the hardcopy output. See chart_demo.c in the ChartDemo1 subdirectory of the demos directory for a code example.


CGM Output

The CGM hardopy output offers similar functionality to that of the PostScript output. Function XintOutputCGM creates a CGM file containing the graphic representation of an EditObject widget or container widget and of all the graphic objects contained inside. Function XintOutputMontageCGM can also be used to create a composite output of multiple EditObject widgets.