Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
SoCGMVectorOutput Class Reference

HardCopy Class used to write vector formatted CGM files. More...

#include <HardCopy/SoVectorizeCGMAction.h>

+ Inheritance diagram for SoCGMVectorOutput:

Public Member Functions

 SoCGMVectorOutput ()
 Constructor.
 
virtual ~SoCGMVectorOutput ()
 Destructor.
 
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) .
 
void setBinary (SbBool flag=TRUE)
 Sets the output mode.
 
SbBool isBinary () const
 Gets the output mode.
 
void setVersion (int vers=1)
 Sets the version of the output CGM file.
 
int getVersion () const
 Gets the version of the output CGM file.
 
void setIndexed (SbBool flag=TRUE)
 Sets the color mode.
 
SbBool isIndexed () const
 Gets the color mode.
 
- 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 void closeFile ()
 Closes the current file opened with openFile().
 

Detailed Description

HardCopy Class used to write vector formatted CGM files.

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

The environment variable OIV_CGM_HARDCOPY_BUFSIZE specifies the buffer size in bytes for storing CGM calls before writing them to the disk. The default buffer size is 1048576 bytes (1 megabyte). If set to 1, no buffering is done.

Definition at line 46 of file SoVectorizeCGMAction.h.

Constructor & Destructor Documentation

◆ SoCGMVectorOutput()

SoCGMVectorOutput::SoCGMVectorOutput ( )

Constructor.

The default constructor writes to stdout.

◆ ~SoCGMVectorOutput()

virtual SoCGMVectorOutput::~SoCGMVectorOutput ( )
virtual

Destructor.

The destructor closes any files opened by the SoCGMVectorOutput.

Member Function Documentation

◆ getVersion()

int SoCGMVectorOutput::getVersion ( ) const
inline

Gets the version of the output CGM file.

Definition at line 112 of file SoVectorizeCGMAction.h.

◆ isBinary()

SbBool SoCGMVectorOutput::isBinary ( ) const
inline

Gets the output mode.

Definition at line 91 of file SoVectorizeCGMAction.h.

◆ isIndexed()

SbBool SoCGMVectorOutput::isIndexed ( ) const
inline

Gets the color mode.

Definition at line 127 of file SoVectorizeCGMAction.h.

◆ openFile() [1/2]

virtual SoNONUNICODE SbBool SoCGMVectorOutput::openFile ( const char *  file_name)
virtual

Opens named file (sets file pointer to result) .

It returns FALSE on error.

Non Unicode: This function should not be used in a Unicode application.

Reimplemented from SoVectorOutput.

◆ openFile() [2/2]

virtual SbBool SoCGMVectorOutput::openFile ( const SbString file_name)
virtual

Opens named file (sets file pointer to result) .

It returns FALSE on error.

Reimplemented from SoVectorOutput.

◆ setBinary()

void SoCGMVectorOutput::setBinary ( SbBool  flag = TRUE)
inline

Sets the output mode.

This mode can be clear text encoding or binary mode encoding. The default mode is clear text encoding.

Definition at line 85 of file SoVectorizeCGMAction.h.

◆ setIndexed()

void SoCGMVectorOutput::setIndexed ( SbBool  flag = TRUE)
inline

Sets the color mode.

The default color mode is Indexed and the other mode is Direct (RGB).

Definition at line 121 of file SoVectorizeCGMAction.h.

◆ setVersion()

void SoCGMVectorOutput::setVersion ( int  vers = 1)
inline

Sets the version of the output CGM file.

The default version is 1.

  • When the version of CGM is less than 3, the setLineEndStyle(), getLineEndStyle(), setLineJoinStyle(), getLineJoinStyle(), setMiterLimit(), and getMiterLimit() methods have no effect on the output.
  • In versions 1 and 2 of CGM, dashed line patterns are default patterns defined by CGM (solid, dash, dot, dash-dot, dash-dot-dot).

Definition at line 106 of file SoVectorizeCGMAction.h.


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