These actions are all derived from the SoVectorizeAction( C++ | Java | .NET )class. As with the SoWriteAction( C++ | Java | .NET )within Open Inventor that outputs the scene graph by writing to an SoOutput( C++ | Java | .NET )object, this class uses an SoVectorOutput( C++ | Java | .NET )object. This allows you to connect a file to the action using the getOutput()method and to output PostScript, HPGL, CGM, or GDI (only with Microsoft Windows) code to the file using the apply()method. This method specifies the part of the scene graph to which the action should be applied. This may be a node, a path, or a list of paths.
The four classes derived from SoVectorizeAction( C++ | Java | .NET )are:
SoVectorizeAction( C++ | Java | .NET )
SoVectorizePSAction
SoVectorizeHPGLAction
SoVectorizeCGMAction
Output CGM clear text or binary encoding. You can select which encoding you want by applying the setVersion method to the action.
SoVectorizeGDIAction
Output GDI formats (available only with Microsoft Windows). Several types of output are available: Enhanced Metafiles files (EMF), directly to the printer, in a Device Context (DC).
Figure 4.1. VectorizeAction classes
The four classes derived from SoVectorOutput( C++ | Java | .NET )are:
These actions allow you to configure the printer or plotter or CGM parameters using the methods listed below. (Please see the reference manual for a full description of these methods and their parameters. Not all of the following parameters apply to all output formats.)
To specify the size of the output. These dimensions are defined using current units.
To specify the origin of the drawing.
To specify the orientation of the drawing (portrait or landscape).
To specify the background color of the drawing.
To specify the nominal width of lines. The line width scale factor will be applied to the nominal line width to compute the actual line width.
To specify how to convert black and white colors. Colors can be used as is or reversed.
These three methods specify how the ends of wide lines are drawn and how multiple wide lines are joined. Refer to the reference manual for a complete description of the appearance of output depending on the parameters of these three methods.
To specify number of pens, their colors, and their widths.
To specify how HardCopy should match a required color to the actual colors given by the setPenDescription method. HardCopy can choose the pen with the closest matching color, the closest matching width, or a combination of both depending on the priority parameter.
To take into account lighting.
To realize multiple plots per page.
To specify the association between the pixel image and pixel printer size.
setHLHSRMode
To specify Hidden Line and Hidden Surface Removal mode (HLHSR). By default, no HLHSR is done. (The output will look as if you had rendered the scene graph in a viewer with the depth buffer comparison test turned off.) Generally, HLHSR_RASTER mode gives the best combination of performance and image quality.
setShadeModel
To specify the shading model to use. With the default model (FLAT), each polygon is filled with a unique color which is the average of the colors associated with each vertex of the original polygon. With the smooth model (SMOOTH), each polygon is filled with shaded colors which are interpolations of the colors associated with each vertex of the original polygon.
Smooth shading is only supported with PostScript Level 3 format. |
HardCopy has the following limitations:
|