Hardcopy Output Functions

Th following set of functions can be used to produce files containing a PostScript or CGM representation of a View3D widget..

Function NameDescription
XintCGMDrawBoxTo tell the CGM output whether or not to draw a box around a CGM plot.
XintCGMGetDimensionsGets the size in inches used by a View3D widget.
XintOutputCGMCreates a CGM file containing the graphic representation of a single widget.
XintOutputCompositeCGMCreates a CGM file containing the graphic representation of all of the widgets that are children of a composite widget.
XintOutputCompositePostscriptCreates a PostScript file containing the graphic representation of all the widgets that are children of a composite widget.
XintOutputMontageCGMCreates a CGM file containing the graphic representation of a single widget.
XintOutputMontagePostscriptCreates a PostScript file containing a montage composed of several widgets.
XintOutputPostscriptCreates a PostScript file containing the graphic representation of a single widget.
XintPostscriptGetDefaultsGets the PostScript page characteristics.
XintPostscriptSetDefaultsSets the PostScript page characteristics.
XintView3DAddTiffToMovieFileThis function adds a TIFF file to the end of a movie file.
XintView3DReadTiffFileThis function will read the image data from a TIFF file.
XintView3DWriteTiffThis function outputs the View3D screen display as a TIFF file.


XintCGMDrawBox

This function sets a flag that tells the CGM output routines XintOutputCGM and XintOutputCompositeCGM whether or not to draw a rectangular box around the plot.

     void XintCGMDrawBox (Boolean flag)

where flag is a Boolean variable that should be set to True to have the box drawn around the plot.


XintCGMGetDimensions

This function returns the dimensions (in inches) that a widget (or combination of widgets) will occupy when mapped to a plot. This function is usually called prior to calling a CGM hardcopy function so that you may specify the appropriate dimensions in the CGM hardcopy function call.

     void XintCGMGetDimensions (...)

WidgetwidgetThe ID of the widget to be output.
float *widthWidth in inches of the widget's extent.
float *heightHeight in inches of the widget's extent.


XintOutputCGM

Writes a color CGM description of a widget (whose class is derived from the XintCompBase widget class) to a disk file.

     Boolean    XintOutputCGM (...)

WidgetwidgetThe ID of the widget to be output.
char *filenameName of CGM file to be created.
doubleplot_widthSpecifies the width in inches of the CGM plot to be generated.
doubleplot_heightSpecifies the height in inches of the CGM plot to be generated.

In case of error, the function returns a warning message to the end user (as controlled by resource XmNwarning) and returns False. Otherwise, it returns True.


XintOutputCompositeCGM

This function writes a color CGM description of the contents of a container widget to a disk file. The geometry of the widgets inside the container widget is preserved. However, widgets contained in a Motif ScrolledWindow widget are expanded to their full size and the scrollbars are not displayed. Only widgets that are instances of CompBase, Motif Label or one of their subclasses will be output.

     Boolean   XintOutputCompositeCGM (...)

WidgetwidgetComposite widget for output.
char *filenameName of CGM file to be created.
doubleplot_widthSpecifies the width in inches of the CGM plot to be generated.
doubleplot_heightSpecifies the height in inches of the CGM plot to be generated.

In case of error, the function displays a warning message (as controlled by resource XmNwarning) to the end user and returns False. Otherwise, it returns True.


XintOutputCompositePostscript

This function writes a scaled monochrome or color PostScript description of the contents of a container widget to a disk file. The geometry of the widgets inside the container widget is preserved. However, widgets contained in a Motif ScrolledWindow widget are expanded to their full size and the scrollbars are not displayed. Only widgets that are instances of CompBase, Motif Label, Motif LabelGadget or one of their subclasses will be output.

     Boolean   XintOutputCompositePostscript (...)

WidgetwidgetContainer widget containing combination of widgets for output.
char *filenameName of PostScript file to be created.
doublescale_factorSpecify a real number greater than 0 (see below).
intcolor_modelSpecify XintMONOCHROME for monochrome output or XintCOLOR for color output.
intorientationSpecify one of the values below.

In case of error, the function displays a warning message (as controlled by resource XmNwarning) to the end user and returns False. Otherwise, it returns True.

The argument orientation must be specified as one of the following:

Resource ValueDescription
XintORIENTATION_PORTRAITImage will be oriented as on screen.
XintORIENTATION_LANDSCAPEImage will be rotated 90 degrees clockwise from the screen image.
XintORIENTATION_AUTOMATICImage will be oriented so that the longest dimension (height or width) will be along the longest dimension of the page.

The scale_factor argument in the function call specifies how the image inside the widget window will be scaled when output to the PostScript file. If you specify 1, then the image will be fit to the page. If you specify a fractional number greater than 0 and less than 1, then the image will be scaled to that fraction of the page. If you specify a number greater than 1, then the image will be scaled by that number, but only as much as can fit on one page will be output.


XintOutputMontageCGM

Writes a color CGM file containing a montage of several widgets into a canvas. The canvas size and the widget positions inside the canvas are specified in pixel units. The convenience function XintGetWidgetSize can be used to obtain the size in pixels of each widget. The widgets in the list must be of a class derived from CompBase, Motif ScrolledWindow or Motif Label.

     Boolean XintOutputMontageCGM (...)

Widget *widget_listList of widgets to output.
int *xpos_listList of x coordinates for the widgets.
int *ypos_listList of y coordinates for the widgets.
intcountNumber of widgets to output.
char *filenameName of CGM file to be created.
intcanvas_widthWidth of canvas in pixels.
intcanvas_heightHeight of canvas in pixels.
doublewidthWidth of plot in inches.
doubleheightHeight of plot in inches.

In case of error, the function displays a warning message (as controlled by resource XmNwarning) to the end user and returns False. Otherwise, it returns True.


XintOutputMontagePostscript

This function writes a color or monochrome PostScript file containing a montage of several widgets into a canvas. The canvas size and the widget positions inside the canvas are specified in pixel units. Convenience function XintGetWidgetSize can be used to obtain the size in pixels of each widget. The widgets in the list must be from a class derived from CompBase, Motif ScrolledWindow or Motif Label.

     Boolean XintOutputMontagePostscript (...)

Widget *widget_listList of widgets to output.
int *xpos_listList of x coordinates for the widgets.
int *ypos_listList of y coordinates for the widgets.
intcountNumber of widgets to output.
char *filenameName of PostScript file to be created.
intcanvas_widthWidth of canvas in pixels.
intcanvas_heightHeight of canvas in pixels.
doublescaleSpecify a real number greater than 0 (see below).
intcolor_modelSpecify XintMONOCHROME for monochrome output or XintCOLOR for color output.
intorientationSpecify one of the values below.

In case of error, the function displays a warning message to the end user (as controlled by resource XmNwarning) and returns False; otherwise, it returns True.

The argument orientation must be specified as one of the following defined constants:

Resource ValueDescription
XintORIENTATION_PORTRAITImage will be oriented as on screen.
XintORIENTATION_LANDSCAPEImage will be rotated 90 degrees clockwise from the screen image.
XintORIENTATION_AUTOMATICImage will be oriented so that the longest dimension (height or width) will be along the longest dimension of the page.

The scale_factor argument in the function call specifies how the image inside the widget window will be scaled when output to the PostScript file. If you specify 1, the image will be fit to the page. If you specify a fractional number greater than 0 and less than 1, the image will be scaled to that fraction of the page. If you specify a number greater than 1, the image will be scaled by that number, but only as much as can fit on one page will be output to the PostScript file.


XintOutputPostscript

This function writes a scaled monochrome or color PostScript description of a widget (whose class is derived from the XintCompBase widget class) to a disk file.

     Boolean XintOutputPostscript (...)

WidgetwidgetWidget for output.
char *filenameName of PostScript file to be created.
doublescale_factorSpecify a real number greater than 0 (see below).
intcolor_modelSpecify XintMONOCHROME for monochrome output or XintCOLOR for color output.
intorientationSpecify one of the values below.

In case of error, the function displays a warning message to the end user and returns False; otherwise, it returns True.

Arguments orientation and scale_factor are the same as in function XintOutputMontagePostscript described above.


XintPostscriptGetDefaults

This function gets the PostScript output page characteristics set by using the XintPostscriptSetDefaults function.

     void XintPostscriptGetDefaults (...)

int *resolutionReturns a pointer to an integer specifying the page resolution in dots per inch.
float *page_width>Returns a pointer to a floating point number specifying the page width in inches.
float *page_heightReturns a pointer to a floating point number specifying the page height in inches.


XintPostscriptSetDefaults

This function sets the PostScript output page characteristics used by the XintOutputPostscript and XintOutputCompositePostscript functions.

     void XintPostscriptSetDefaults (...)

int *resolutionReturns a pointer to an integer specifying the page resolution in dots per inch.
doublepage_widthSpecifies the page width in inches.
doublepage_heightSpecifies the page height in inches.


XintView3DAddTiffToMovieFile

This function adds a TIFF file to the end of a movie file.

     void XintView3DAddTiffToMovieFile (...)

char *tiff_fileName of TIFF file to add to movie.
char *movie_fileName of movie file to add TIFF file to.


XintView3DReadTiffFile

This function will return the image data in a TIFF file. The component of image will determine the color or grey image. This could be used to read data from voxel slices.

     unsigned char *XintView3DReadTiffFile (...)

char *filenameName of TIFF file.
int *widthWidth of image returned.
int *heightHeight of image returned.
int *num_componentComponents of image returned.


XintView3DWriteTiff

This function writes the View3D screen display to a TIFF file.

     void XintView3DWriteTiff (...)

WidgetwidgetID of the View3D widget.
char *fileName of output TIFF file.