Class SoPSVectorOutput


public class SoPSVectorOutput extends SoVectorOutput
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.
  • Constructor Details

    • SoPSVectorOutput

      public SoPSVectorOutput()
      Constructor. The default constructor writes to stdout.
  • Method Details

    • setColored

      public void setColored()
      Calls setColored(true).
    • getColored

      public boolean getColored()
      Gets the colored output flag.
    • setLevel

      public void setLevel(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().
    • getNumericAccuracy

      public float getNumericAccuracy()
      Returns the factor used to compute the accuracy of all real numeric values. See setNumericAccuracyFactor() for details.
    • getLevel

      public int getLevel()
      Returns the PostScript language level.
    • setNumericAccuracyFactor

      public void setNumericAccuracyFactor(float factor)
      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

    • setColored

      public void setColored(boolean flag)
      Sets the colored output flag. By default, the flag is set to true.