Class SoCGMVectorOutput


public class SoCGMVectorOutput extends SoVectorOutput
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.

  • 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).