Class SoVectorizeAction
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.inventor.actions.SoAction
-
- com.openinventor.hardcopy.SoVectorizeAction
-
- Direct Known Subclasses:
SoVectorizeCGMAction,SoVectorizeGDIAction,SoVectorizeHPGLAction,SoVectorizePSAction
public abstract class SoVectorizeAction extends SoAction
Abstract class for vectorizing a scene graph to a file. This class is an abstract class for all vectorize actions. The supported subclasses areSoVectorizeCGMAction,SoVectorizeGDIAction(Win32 only),SoVectorizeHPGLAction, andSoVectorizePSAction. As withSoWriteAction, these subclasses contain anSoVectorOutputinstance (or derived) which writes by default to standard output. Methods onSoVectorOutputcan be called to specify what file to write to.Default values:
- Orientation:
PORTRAIT - Start position: X=10.0 mm and Y=10.0 mm
- Dimensions: Width=190.0 mm and Height=277.0 mm
- Border width: 2.0 mm
- Border color: (1.,1.,1.)
- Background: no background
- Nominal width: 0.35 mm
- Pixel image size: 0.35mm
- Color Translation method:
REVERSE_ONLY_BLACK_AND_WHITE - Number of pens: 0
- Color priority: true
- Line End Style:
BUTT_END - Line Join Style:
NO_JOIN - Miter limit: 1.5 (Miter Length / Line Width)
- HLHSR mode:
NO_HLHSR - Lighting enabled: false
- Polygon/Line/Marker offset: 0
- Shade model:
FLAT - HLHSR raster quality: 0.5
Line end styles description:
Force black and white rendering:
It is possible to force black and white rendering by setting the environment variable OIV_HC_BLACK_AND_WHITE (seeSoPreferences). In this mode all non-white colors are set to full black. This is useful because selecting "black & white" in the printer setup dialog normally produces gray scale rendering and some colors may be difficult to see. This option is applied after color translation (e.g. REVERSE_ONLY_BLACK_AND_WHITE). The variable must be set before creating an instance of the class.Performance:
The HLHSR modesNO_HLHSRandHLHSR_SIMPLE_PAINTERare generally quite fast and should be used whenever possible (when the resulting image quality is acceptable or when a quick preview is desired). The other HLHSR modes involve computations that are very CPU intensive. In other words, the time required to produce an image depends almost entirely on the machine's processor speed.HLHSR_PAINTER_SURFACE_REMOVALhas a very small dependency on the graphics board (because it does one offscreen render) whereasHLHSR_RASTERperformance is completely linked to the graphics board performance. The other modes are not affected by the graphics board performance. One implication of the CPU dependency is that the release libraries will generally be much faster than the debug libraries (because of compiler optimizations). Benchmarking should always be done using the release libraries.Performance is directly related to the number of primitives (individual faces and line segments, not the number of nodes in the scene graph) and the number of intersecting or difficult-to-sort primitives. Performance decreases rapidly (worse than linear) for large numbers of primitives. Therefore algorithms that can reduce the number of primitives may be needed for large scenes (see, for example,
SoSimplifyAction).In some cases setting a small polygon offset can improve performance by reducing interference between faces and lines (used only with the Painter's algorithm HLHSR modes).
HIDDEN_LINES_REMOVALmode is very slow and should not be used unless very precise output is required.Generally
HLHSR_RASTERmode gives the best combination of performance and image quality.Limitations
- Modeling clipping (
SoClipPlane) is ignored. - Textures are ignored (polygons are drawn as if no texture is applied).
- Transparency is ignored.
SoAnnotationnodes are handled likeSoSeparatornodes.- Smooth shading is only supported with PostScript Level 3.
SoText2(andSoAnnoText3using an xxx_PRINT_RASTER option) will be rendered using native fonts, so the requested font name must be available on the rendering device.- VolumeViz representations are not supported (because texturing is not possible).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSoVectorizeAction.ColorTranslationMethodsColor translation methods.static classSoVectorizeAction.DimensionUnitsDimension unit.static classSoVectorizeAction.EndLineStylesEnd line style.static classSoVectorizeAction.HLHSRModesHLHSR (Hidden Line and Hidden Surface Removal) mode.static classSoVectorizeAction.JoinLineStylesJoin line style.static classSoVectorizeAction.OrientationsOrientation type.static classSoVectorizeAction.ShadeModelsShading models.-
Nested classes/interfaces inherited from class com.openinventor.inventor.actions.SoAction
SoAction.AppliedCodes, SoAction.DistribModes, SoAction.PathCodes, SoAction.PathIndices
-
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
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbeginPage(SbVec2f startPagePosition, SbVec2f pageSize)Calls beginPage(startPagePosition, pageSize, SoVectorizeAction.DimensionUnits.valueOf( SoVectorizeAction.DimensionUnits.MM.getValue() )).voidbeginPage(SbVec2f startPagePosition, SbVec2f pageSize, SoVectorizeAction.DimensionUnits u)Begin a new page.static voidenableElement(java.lang.Class<? extends Inventor> t, int stkIndex)voidenableLighting(boolean flag)Allows the user to enable/disable the taking into account of lights in the scene graph during the computation of the vectorized file.voidendPage()Ends a page.SbColorgetBackgroundColor()Returns the color of the background.booleangetColorPriority()Returns the color priority.SoVectorizeAction.ColorTranslationMethodsgetColorTranslationMethod()Returns the method for choosing the color of the drawing on the sheet of paper.SbVec2fgetDrawingDimensions()Calls getDrawingDimensions(SoVectorizeAction.DimensionUnits.valueOf( SoVectorizeAction.DimensionUnits.MM.getValue() )).SbVec2fgetDrawingDimensions(SoVectorizeAction.DimensionUnits u)Returns the dimensions of the drawing on the sheet of paper.SoVectorizeAction.HLHSRModesgetHLHSRMode()Returns the Hidden Line and Hidden Surface Removal mode.booleangetHLHSRRasterCaching()Returns the raster caching flag.floatgetHLHSRRasterQuality()Returns the raster image quality value.SoVectorizeAction.EndLineStylesgetLineEndStyle()Returns the style for line ends.SoVectorizeAction.JoinLineStylesgetLineJoinsStyle()Returns the style for line joins.floatgetLineOffset()Returns line offset.floatgetLinePatternSize()Calls getLinePatternSize(SoVectorizeAction.DimensionUnits.valueOf( SoVectorizeAction.DimensionUnits.MM.getValue() )).floatgetLinePatternSize(SoVectorizeAction.DimensionUnits u)Returns the line pattern scale factor.floatgetMarkerOffset()Returns marker offset.floatgetMiterLimit()Returns the miter limit.floatgetNominalWidth()Calls getNominalWidth(SoVectorizeAction.DimensionUnits.valueOf( SoVectorizeAction.DimensionUnits.MM.getValue() )).floatgetNominalWidth(SoVectorizeAction.DimensionUnits u)Returns the nominal width.SoVectorizeAction.OrientationsgetOrientation()Returns the orientation of the drawing on the sheet of paper.intgetPenNum()Returns the number of pens.floatgetPixelImageSize()Calls getPixelImageSize(SoVectorizeAction.DimensionUnits.valueOf( SoVectorizeAction.DimensionUnits.MM.getValue() )).floatgetPixelImageSize(SoVectorizeAction.DimensionUnits u)Returns the size of a pixel.floatgetPolygonOffset()Returns polygon offset.SoVectorizeAction.ShadeModelsgetShadeModel()Returns the shade model.SbVec2fgetStartPosition()Calls getStartPosition(SoVectorizeAction.DimensionUnits.valueOf( SoVectorizeAction.DimensionUnits.MM.getValue() )).SbVec2fgetStartPosition(SoVectorizeAction.DimensionUnits u)Returns the start position of the drawing on the sheet of paper.SoVectorOutputgetVectorOutput()Output access method.booleanisLightingEnabled()Returns true if lighting is enabled.voidsetBackgroundColor(boolean bg)Enables or disables the background and sets its color to white.voidsetBackgroundColor(boolean bg, SbColor color)Sets the color of the background.voidsetBorder(float width)Sets the width of the border of the clipping limits.voidsetBorder(float width, SbColor color)Sets the color and the width of the border of the clipping limits.voidsetColorPriority(boolean priority)Sets the color priority flag.voidsetColorTranslationMethod(SoVectorizeAction.ColorTranslationMethods method)Sets the method for choosing the color of the drawing on the sheet of paper.voidsetDrawingDimensions(float w, float h)Calls setDrawingDimensions(w, h, SoVectorizeAction.DimensionUnits.valueOf( SoVectorizeAction.DimensionUnits.MM.getValue() )).voidsetDrawingDimensions(float w, float h, SoVectorizeAction.DimensionUnits u)Sets the dimensions of the drawing on the sheet of paper.voidsetDrawingDimensions(SbVec2f d)Calls setDrawingDimensions(d, SoVectorizeAction.DimensionUnits.valueOf( SoVectorizeAction.DimensionUnits.MM.getValue() )).voidsetDrawingDimensions(SbVec2f d, SoVectorizeAction.DimensionUnits u)Sets the dimensions of the drawing on the sheet of paper.voidsetHLHSRMode(SoVectorizeAction.HLHSRModes mode)Sets the Hidden Line and Hidden Surface Removal mode.voidsetHLHSRRasterCaching(boolean enable)Enables/disables the use of OpenGL display lists to generate the raster image with theHLHSR_RASTERalgorithm.voidsetHLHSRRasterQuality(float quality)Sets the quality of the raster image generated to vectorize visible primitives with theHLHSR_RASTERalgorithm.voidsetLineEndStyle(SoVectorizeAction.EndLineStyles style)Sets the style for line ends.voidsetLineJoinsStyle(SoVectorizeAction.JoinLineStyles style)Sets the style for line joins.voidsetLineOffset(float offset)Sets line offset.voidsetLinePatternSize(float w)Calls setLinePatternSize(w, SoVectorizeAction.DimensionUnits.valueOf( SoVectorizeAction.DimensionUnits.MM.getValue() )).voidsetLinePatternSize(float w, SoVectorizeAction.DimensionUnits u)Sets the line pattern size, i.e., the association between printer pattern (16 printer "points") and the size of the line pattern on the hard copy output.voidsetMarkerOffset(float offset)Sets marker offset.voidsetMiterLimit(float limit)Sets the miter limit.voidsetNominalWidth(float w)Calls setNominalWidth(w, SoVectorizeAction.DimensionUnits.valueOf( SoVectorizeAction.DimensionUnits.MM.getValue() )).voidsetNominalWidth(float w, SoVectorizeAction.DimensionUnits u)Sets the nominal width.voidsetOrientation(SoVectorizeAction.Orientations o)Sets the orientation of the drawing on the sheet of paper.voidsetPenDescription()Calls setPenDescription((com.openinventor.inventor.SbColor[])null, (float[])null, SoVectorizeAction.DimensionUnits.valueOf( SoVectorizeAction.DimensionUnits.MM.getValue() )).voidsetPenDescription(SbColor[] colors)Calls setPenDescription(colors, (float[])null, SoVectorizeAction.DimensionUnits.valueOf( SoVectorizeAction.DimensionUnits.MM.getValue() )).voidsetPenDescription(SbColor[] colors, float[] widths)Calls setPenDescription(colors, widths, SoVectorizeAction.DimensionUnits.valueOf( SoVectorizeAction.DimensionUnits.MM.getValue() )).voidsetPenDescription(SbColor[] colors, float[] widths, SoVectorizeAction.DimensionUnits u)Sets the description of the color and the width of each pen.voidsetPixelImageSize(float w)Calls setPixelImageSize(w, SoVectorizeAction.DimensionUnits.valueOf( SoVectorizeAction.DimensionUnits.MM.getValue() )).voidsetPixelImageSize(float w, SoVectorizeAction.DimensionUnits u)Sets the size of a pixel for image primitives.voidsetPolygonOffset(float offset)Method to set the Z offset to be applied to polygons in normalized device coordinates (-1 to 1 space).voidsetShadeModel(SoVectorizeAction.ShadeModels model)voidsetStartPosition(float x, float y)Calls setStartPosition(x, y, SoVectorizeAction.DimensionUnits.valueOf( SoVectorizeAction.DimensionUnits.MM.getValue() )).voidsetStartPosition(float x, float y, SoVectorizeAction.DimensionUnits u)Sets the start position of the drawing on the sheet of paper.voidsetStartPosition(SbVec2f p)Calls setStartPosition(p, SoVectorizeAction.DimensionUnits.valueOf( SoVectorizeAction.DimensionUnits.MM.getValue() )).voidsetStartPosition(SbVec2f p, SoVectorizeAction.DimensionUnits u)Sets the start position of the drawing on the sheet of paper.-
Methods inherited from class com.openinventor.inventor.actions.SoAction
apply, apply, clearApplyResult, forwardTraversal, forwardTraversal, getContinueActionInBranchFlag, getCurPath, getDistribMode, getNodeAppliedTo, getOriginalPathListAppliedTo, getPathAppliedTo, getPathCode, getPathListAppliedTo, getPipeId, getSceneManager, getState, getWhatAppliedTo, hasTerminated, invalidateState, isBeingApplied, isLastPathListAppliedTo, isUsingAlternateRep, nullAction, postDelayedTraversal, preDelayedTraversal, resetContinueActionInBranchFlag, setPipeId, setSceneManager, setUpState, stopActionInBranch, traverse, useAlternateRep
-
Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
-
-
-
Method Detail
-
beginPage
public void beginPage(SbVec2f startPagePosition, SbVec2f pageSize)
Calls beginPage(startPagePosition, pageSize, SoVectorizeAction.DimensionUnits.valueOf( SoVectorizeAction.DimensionUnits.MM.getValue() )).
-
setDrawingDimensions
public void setDrawingDimensions(float w, float h)Calls setDrawingDimensions(w, h, SoVectorizeAction.DimensionUnits.valueOf( SoVectorizeAction.DimensionUnits.MM.getValue() )).
-
setPenDescription
public void setPenDescription(SbColor[] colors, float[] widths)
Calls setPenDescription(colors, widths, SoVectorizeAction.DimensionUnits.valueOf( SoVectorizeAction.DimensionUnits.MM.getValue() )).
-
setPixelImageSize
public void setPixelImageSize(float w)
Calls setPixelImageSize(w, SoVectorizeAction.DimensionUnits.valueOf( SoVectorizeAction.DimensionUnits.MM.getValue() )).
-
getLinePatternSize
public float getLinePatternSize()
Calls getLinePatternSize(SoVectorizeAction.DimensionUnits.valueOf( SoVectorizeAction.DimensionUnits.MM.getValue() )).
-
setLinePatternSize
public void setLinePatternSize(float w)
Calls setLinePatternSize(w, SoVectorizeAction.DimensionUnits.valueOf( SoVectorizeAction.DimensionUnits.MM.getValue() )).
-
setPenDescription
public void setPenDescription(SbColor[] colors)
Calls setPenDescription(colors, (float[])null, SoVectorizeAction.DimensionUnits.valueOf( SoVectorizeAction.DimensionUnits.MM.getValue() )).
-
setPenDescription
public void setPenDescription()
Calls setPenDescription((com.openinventor.inventor.SbColor[])null, (float[])null, SoVectorizeAction.DimensionUnits.valueOf( SoVectorizeAction.DimensionUnits.MM.getValue() )).
-
getPixelImageSize
public float getPixelImageSize()
Calls getPixelImageSize(SoVectorizeAction.DimensionUnits.valueOf( SoVectorizeAction.DimensionUnits.MM.getValue() )).
-
getNominalWidth
public float getNominalWidth()
Calls getNominalWidth(SoVectorizeAction.DimensionUnits.valueOf( SoVectorizeAction.DimensionUnits.MM.getValue() )).
-
setStartPosition
public void setStartPosition(float x, float y)Calls setStartPosition(x, y, SoVectorizeAction.DimensionUnits.valueOf( SoVectorizeAction.DimensionUnits.MM.getValue() )).
-
getDrawingDimensions
public SbVec2f getDrawingDimensions()
Calls getDrawingDimensions(SoVectorizeAction.DimensionUnits.valueOf( SoVectorizeAction.DimensionUnits.MM.getValue() )).
-
setDrawingDimensions
public void setDrawingDimensions(SbVec2f d)
Calls setDrawingDimensions(d, SoVectorizeAction.DimensionUnits.valueOf( SoVectorizeAction.DimensionUnits.MM.getValue() )).
-
setNominalWidth
public void setNominalWidth(float w)
Calls setNominalWidth(w, SoVectorizeAction.DimensionUnits.valueOf( SoVectorizeAction.DimensionUnits.MM.getValue() )).
-
getStartPosition
public SbVec2f getStartPosition()
Calls getStartPosition(SoVectorizeAction.DimensionUnits.valueOf( SoVectorizeAction.DimensionUnits.MM.getValue() )).
-
setStartPosition
public void setStartPosition(SbVec2f p)
Calls setStartPosition(p, SoVectorizeAction.DimensionUnits.valueOf( SoVectorizeAction.DimensionUnits.MM.getValue() )).
-
getHLHSRRasterQuality
public float getHLHSRRasterQuality()
Returns the raster image quality value. SeesetHLHSRRasterQuality().
-
setHLHSRRasterQuality
public void setHLHSRRasterQuality(float quality)
Sets the quality of the raster image generated to vectorize visible primitives with theHLHSR_RASTERalgorithm. 0 is the worst quality, 1 is the best.
-
getColorPriority
public boolean getColorPriority()
Returns the color priority.
-
setHLHSRMode
public void setHLHSRMode(SoVectorizeAction.HLHSRModes mode)
Sets the Hidden Line and Hidden Surface Removal mode. Possible values of mode:NO_HLHSR. Hidden lines and hidden surfaces are not removed.HLHSR_SIMPLE_PAINTER. Simple painter's algorithm is used for HLHSR. Lines and surfaces are sorted by their maximum Z depth and displayed in order from front to back so lines and surfaces that are in the foreground are drawn last. If the scene contains interpenetrating primitives, there may be visibility errors in the resulting output.HLHSR_PAINTER. Like the simple painter's algorithm, the primitives are depth sorted and displayed from front to back. In addition, some ambiguities where the polygons' Z extents overlap are resolved. Primitives that intersect other primitives are split and the new pieces sorted to provide more correct visual results. This mode is slower than the HLHSR_SIMPLE_PAINTER mode.HLHSR_PAINTER_SURFACE_REMOVAL. This mode is the same as the previous, but a first pass removes surfaces that are completely hidden. The method used to remove hidden surfaces is a pixel rendering method, so for very small surfaces, some accuracy errors can occur. Because some surfaces are removed before the painter's algorithm is applied, this method can be significantly faster than the previous one. Generally output files are smaller than using the previous method.HLHSR_RASTER. A raster image is generated and vectorized to determine visible primitives.HIDDEN_LINES_REMOVAL. This mode removes all hidden lines. Whether the screen render style is FILLED or LINES, the output render style will be lines. This mode is very slow but gives correct results.
-
setColorPriority
public void setColorPriority(boolean priority)
Sets the color priority flag. If priority = true, a pen will be chosen according to its color. Otherwise, it will be chosen according to its width.
-
setHLHSRRasterCaching
public void setHLHSRRasterCaching(boolean enable)
Enables/disables the use of OpenGL display lists to generate the raster image with theHLHSR_RASTERalgorithm. Enabled by default.
-
getMiterLimit
public float getMiterLimit()
Returns the miter limit.
-
getVectorOutput
public SoVectorOutput getVectorOutput()
Output access method. Returns theSoOutputinstance in action.
-
setPenDescription
public void setPenDescription(SbColor[] colors, float[] widths, SoVectorizeAction.DimensionUnits u)
Sets the description of the color and the width of each pen. The function is useful for pen plotters, but can also be used for raster plotters. For raster plotters, the drawing color is the color of the chosen pen. This is useful to force the plotter to use a set of colors. If the width parameter is not specified, a 0.35 mm value is assumed.
-
getHLHSRRasterCaching
public boolean getHLHSRRasterCaching()
Returns the raster caching flag. SeesetHLHSRRasterCaching().
-
getPenNum
public int getPenNum()
Returns the number of pens.
-
getHLHSRMode
public SoVectorizeAction.HLHSRModes getHLHSRMode()
Returns the Hidden Line and Hidden Surface Removal mode.
-
getLineOffset
public float getLineOffset()
Returns line offset. SeesetPolygonOffset.
-
getPolygonOffset
public float getPolygonOffset()
Returns polygon offset. SeesetPolygonOffset.
-
setMarkerOffset
public void setMarkerOffset(float offset)
Sets marker offset. SeesetPolygonOffset.
-
getBackgroundColor
public SbColor getBackgroundColor()
Returns the color of the background.
-
enableElement
public static void enableElement(java.lang.Class<? extends Inventor> t, int stkIndex)
-
getMarkerOffset
public float getMarkerOffset()
Returns marker offset. SeesetPolygonOffset.
-
setShadeModel
public void setShadeModel(SoVectorizeAction.ShadeModels model)
-
isLightingEnabled
public boolean isLightingEnabled()
Returns true if lighting is enabled.
-
enableLighting
public void enableLighting(boolean flag)
Allows the user to enable/disable the taking into account of lights in the scene graph during the computation of the vectorized file. If ...- flag = false, whatever the light model, the color of an object is its diffuse color.
- flag = true and the light model is PHONG, the color of an object depends on its orientation, its material (ambient, diffuse, ..., specular color) and the lights illuminating the object.
-
setLineOffset
public void setLineOffset(float offset)
Sets line offset. SeesetPolygonOffset.
-
setPolygonOffset
public void setPolygonOffset(float offset)
Method to set the Z offset to be applied to polygons in normalized device coordinates (-1 to 1 space). This is useful for separating coplanar lines and polygons. Similar toSoPolygonOffset, a positive offset value moves the primitives away from the camera and a negative value pulls them closer. There are separate methods for lines (setLineOffset) and markers (setMarkerOffset). The default value for the offset methods is zero.
Generally applications should avoid using lines and polygons that are exactly coplanar. Correct results cannot be guaranteed for normal or vectorized rendering.SoPolygonOffsetcan significantly reduce the problem for normal rendering, but has no effect on vectorized rendering. However a Z offset of approximately 0.01 applied to polygons will usually improve the appearance of vectorized coplanar primitives. Applying too large an offset may cause the converse visual artifact where lines that should be hidden become visible.
-
getShadeModel
public SoVectorizeAction.ShadeModels getShadeModel()
Returns the shade model.
-
setBackgroundColor
public void setBackgroundColor(boolean bg, SbColor color)Sets the color of the background. If bg = false, there is no background.
-
setLineEndStyle
public void setLineEndStyle(SoVectorizeAction.EndLineStyles style)
Sets the style for line ends.
-
setNominalWidth
public void setNominalWidth(float w, SoVectorizeAction.DimensionUnits u)Sets the nominal width. For sizes specified in "points" (equals 1/72 inch), specifies the physical size of the "point" on the hard copy output. One printer point is equal to w units where units are millimeters, meters, inches. By default 1 printer point equals approximately 0.3527 millimeters. Used for the following attributes: line width, point size, text size, and text space.
-
setBorder
public void setBorder(float width, SbColor color)Sets the color and the width of the border of the clipping limits. If width = 0, there is no border.
-
getLineEndStyle
public SoVectorizeAction.EndLineStyles getLineEndStyle()
Returns the style for line ends.
-
setBackgroundColor
public void setBackgroundColor(boolean bg)
Enables or disables the background and sets its color to white. If bg = false, there is no background.
-
getNominalWidth
public float getNominalWidth(SoVectorizeAction.DimensionUnits u)
Returns the nominal width.
-
getPixelImageSize
public float getPixelImageSize(SoVectorizeAction.DimensionUnits u)
Returns the size of a pixel.
-
setColorTranslationMethod
public void setColorTranslationMethod(SoVectorizeAction.ColorTranslationMethods method)
Sets the method for choosing the color of the drawing on the sheet of paper. The default value is REVERSE_ONLY_BLACK_AND_WHITE. This method is applied for all colors.
-
getColorTranslationMethod
public SoVectorizeAction.ColorTranslationMethods getColorTranslationMethod()
Returns the method for choosing the color of the drawing on the sheet of paper.
-
setLinePatternSize
public void setLinePatternSize(float w, SoVectorizeAction.DimensionUnits u)Sets the line pattern size, i.e., the association between printer pattern (16 printer "points") and the size of the line pattern on the hard copy output. One printer pattern is equal to SoDrawStyleElement.linePatternScaleFactor * w units where units are millimeters, meters, inches. By default one printer pattern equals 5.6444 millimeters (16 * .3527 mm/point). Used for the following attributes: line pattern length.
-
getLinePatternSize
public float getLinePatternSize(SoVectorizeAction.DimensionUnits u)
Returns the line pattern scale factor.
-
setPixelImageSize
public void setPixelImageSize(float w, SoVectorizeAction.DimensionUnits u)Sets the size of a pixel for image primitives. For sizes specified in pixels, specifies the physical size of a "pixel" on the hard copy output. One pixel is equal to w units where units are millimeters, meters, inches. By default 1 pixel equals 0.35 millimeters. Used for the following attributes: images.
-
setBorder
public void setBorder(float width)
Sets the width of the border of the clipping limits. The color of the border is set to white. If width = 0, there is no border.
-
beginPage
public void beginPage(SbVec2f startPagePosition, SbVec2f pageSize, SoVectorizeAction.DimensionUnits u)
Begin a new page. Allows the user to generate multiple plots per page. A typical use is:SoVectorizePSAction vectPS = new SoVectorizePSAction(); vectPS.beginPage(startPos, pageSize); // Draw the scene graph root1 from the start point // (x1, y1) to the end point(x1+width1, y1+height1) vectPS.setStartPosition(x1, y1); vectPS.setDrawingDimensions(width1, height1); vectPS.setBorder(2.0); vectPS.apply(root1); vectPS.setStartPosition(x2, y2); vectPS.setDrawingDimensions(width2, height2); vectPS.apply(root2); ... vectPS.setStartPosition(xi, yi); vectPS.setDrawingDimensions(widthi, heighti); vectPS.apply(rooti); vectPS.endPage();
-
endPage
public void endPage()
Ends a page. Allows the user to generate multiple plots per page.
-
setDrawingDimensions
public void setDrawingDimensions(float w, float h, SoVectorizeAction.DimensionUnits u)Sets the dimensions of the drawing on the sheet of paper.
-
setMiterLimit
public void setMiterLimit(float limit)
Sets the miter limit.
-
getLineJoinsStyle
public SoVectorizeAction.JoinLineStyles getLineJoinsStyle()
Returns the style for line joins.
-
setLineJoinsStyle
public void setLineJoinsStyle(SoVectorizeAction.JoinLineStyles style)
Sets the style for line joins.
-
setDrawingDimensions
public void setDrawingDimensions(SbVec2f d, SoVectorizeAction.DimensionUnits u)
Sets the dimensions of the drawing on the sheet of paper.
-
getStartPosition
public SbVec2f getStartPosition(SoVectorizeAction.DimensionUnits u)
Returns the start position of the drawing on the sheet of paper.
-
setOrientation
public void setOrientation(SoVectorizeAction.Orientations o)
Sets the orientation of the drawing on the sheet of paper.
-
getOrientation
public SoVectorizeAction.Orientations getOrientation()
Returns the orientation of the drawing on the sheet of paper.
-
getDrawingDimensions
public SbVec2f getDrawingDimensions(SoVectorizeAction.DimensionUnits u)
Returns the dimensions of the drawing on the sheet of paper.
-
setStartPosition
public void setStartPosition(float x, float y, SoVectorizeAction.DimensionUnits u)Sets the start position of the drawing on the sheet of paper.
-
setStartPosition
public void setStartPosition(SbVec2f p, SoVectorizeAction.DimensionUnits u)
Sets the start position of the drawing on the sheet of paper.
-
-