Package com.openinventor.hardcopy
Class SoCGMVectorOutput
java.lang.Object
com.openinventor.inventor.Inventor
com.openinventor.hardcopy.SoVectorOutput
com.openinventor.hardcopy.SoCGMVectorOutput
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
Field Summary
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Gets the version of the output CGM file.boolean
isBinary()
Gets the output mode.boolean
Gets the color mode.void
Calls setBinary(true).void
setBinary
(boolean flag) Sets the output mode.void
Calls setIndexed(true).void
setIndexed
(boolean flag) Sets the color mode.void
Calls setVersion((int)1).void
setVersion
(int vers) Sets the version of the output CGM file.Methods inherited from class com.openinventor.hardcopy.SoVectorOutput
closeFile, openFile
Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
Constructor Details
-
SoCGMVectorOutput
public SoCGMVectorOutput()Constructor. The default constructor writes to stdout.
-
-
Method Details
-
setIndexed
public void setIndexed()Calls setIndexed(true). -
setVersion
public void setVersion()Calls setVersion((int)1). -
setBinary
public void setBinary()Calls setBinary(true). -
setBinary
public void setBinary(boolean flag) Sets the output mode. This mode can be clear text encoding or binary mode encoding. The default mode is clear text encoding. -
isBinary
public boolean isBinary()Gets the output mode. -
isIndexed
public boolean isIndexed()Gets the color mode. -
setVersion
public void setVersion(int vers) 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).
-
getVersion
public int getVersion()Gets the version of the output CGM file. -
setIndexed
public void setIndexed(boolean flag) Sets the color mode. The default color mode is Indexed and the other mode is Direct (RGB).
-