Package com.openinventor.hardcopy
Class SoPSVectorOutput
java.lang.Object
com.openinventor.inventor.Inventor
com.openinventor.hardcopy.SoVectorOutput
com.openinventor.hardcopy.SoPSVectorOutput
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.-
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 TypeMethodDescriptionboolean
Gets the colored output flag.int
getLevel()
Returns the PostScript language level.float
Returns the factor used to compute the accuracy of all real numeric values.void
Calls setColored(true).void
setColored
(boolean flag) Sets the colored output flag.void
setLevel
(int level) Sets the PostScript language level.void
setNumericAccuracyFactor
(float factor) Sets the factor used to compute the accuracy of all real numeric values.Methods inherited from class com.openinventor.hardcopy.SoVectorOutput
closeFile, openFile
Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
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 alsoSoVectorizeAction.setShadeModel()
. -
getNumericAccuracy
public float getNumericAccuracy()Returns the factor used to compute the accuracy of all real numeric values. SeesetNumericAccuracyFactor()
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.
-