Open Inventor Release 2024.2.1
 
Loading...
Searching...
No Matches
SoPSVectorOutput Class Reference

HardCopy Class used to write vector formatted files in PostScript format. More...

#include <HardCopy/SoVectorizePSAction.h>

+ Inheritance diagram for SoPSVectorOutput:

Public Member Functions

 SoPSVectorOutput ()
 Constructor.
 
virtual ~SoPSVectorOutput ()
 Destructor.
 
void setColored (SbBool flag=TRUE)
 Sets the colored output flag.
 
SbBool getColored () const
 Gets the colored output flag.
 
void setLevel (unsigned int level)
 Sets the PostScript language level.
 
unsigned int getLevel () const
 Returns the PostScript language level.
 
void setNumericAccuracyFactor (float factor)
 Sets the factor used to compute the accuracy of all real numeric values.
 
float getNumericAccuracy () const
 Returns the factor used to compute the accuracy of all real numeric values.
 
- Public Member Functions inherited from SoVectorOutput
 SoVectorOutput ()
 Constructor.
 
virtual ~SoVectorOutput ()
 Destructor.
 
virtual void setFilePointer (FILE *newFP)
 Sets file pointer to write to.
 
virtual FILE * getFilePointer ()
 Returns the file pointer in use.
 
virtual SoNONUNICODE SbBool openFile (const char *file_name)
 Opens named file (sets file pointer to result) .
 
virtual SbBool openFile (const SbString &file_name)
 Opens named file (sets file pointer to result) .
 
virtual void closeFile ()
 Closes the current file opened with openFile().
 

Detailed Description

HardCopy Class used to write vector formatted files in PostScript format.

This class is used for writing vector formatted files in Adobe PostScript format. It provides some convenience functions for handling files. An instance of SoPSVectorOutput is contained in an SoVectorizePSAction; this is typically the only instance needed.

Definition at line 40 of file SoVectorizePSAction.h.

Constructor & Destructor Documentation

◆ SoPSVectorOutput()

SoPSVectorOutput::SoPSVectorOutput ( )

Constructor.

The default constructor writes to stdout.

◆ ~SoPSVectorOutput()

virtual SoPSVectorOutput::~SoPSVectorOutput ( )
virtual

Destructor.

The destructor closes any files opened by the SoPSVectorOutput.

Member Function Documentation

◆ getColored()

SbBool SoPSVectorOutput::getColored ( ) const
inline

Gets the colored output flag.

Definition at line 64 of file SoVectorizePSAction.h.

◆ getLevel()

unsigned int SoPSVectorOutput::getLevel ( ) const
inline

Returns the PostScript language level.

Definition at line 81 of file SoVectorizePSAction.h.

◆ getNumericAccuracy()

float SoPSVectorOutput::getNumericAccuracy ( ) const
inline

Returns the factor used to compute the accuracy of all real numeric values.

See setNumericAccuracyFactor() for details.

Definition at line 110 of file SoVectorizePSAction.h.

◆ setColored()

void SoPSVectorOutput::setColored ( SbBool  flag = TRUE)
inline

Sets the colored output flag.

By default, the flag is set to TRUE.

Definition at line 58 of file SoVectorizePSAction.h.

◆ setLevel()

void SoPSVectorOutput::setLevel ( unsigned int  level)

Sets the PostScript language level.

Supported levels range from 1 to 3. The default level is 2. With levels 1 and 2, only flat shading is supported whereas with level 3 and higher, smooth shading is supported. See also SoVectorizeAction::setShadeModel().

◆ setNumericAccuracyFactor()

void SoPSVectorOutput::setNumericAccuracyFactor ( float  factor)
inline

Sets the factor used to compute the accuracy of all real numeric values.

The default value is 0.1.

In order to reduce the PostScript file size, all real numeric values are stored as integer values. The formula used to compute an integer value from a real numeric value is the following:

Integer part of (realValue / (0.24 * NumericAccuracyFactor)) + 0.5

All integer values are globally scaled by 0.24 * NumericAccuracyFactor. Thus this factor allows you to specify higher or lower accuracy, which will have a significant influence on the size of the resulting file. The range of this factor is usually 0.01 <= NumericAccuracyFactor <= 1.0

Definition at line 102 of file SoVectorizePSAction.h.


The documentation for this class was generated from the following file: