public class SoVectorizeGDIAction extends SoVectorizeAction
This class is used for vectorizing scene graphs to GDI format outputs. It contains an SoGDIVectorOutput
instance which writes by default to the standard output (printer). Methods on the SoGDIVectorOutput
can be called to specify the output type and its attributes (such as the EMF file name).
NOTE: If margin values are not valid for the targeted printer driver, it will be automatically reset to a correct one by the driver without prompting the user that the resulting output may not be exactly what he expected.
Printer Control:
By default this class controls the printer (making the StartDoc, StartPage, etc Windows system calls) and defines the logical to device coordinate system mapping. In some cases the application, or application framework (e.g. MFC) may wish to control the printer directly. This is possible by setting the preference variable OIV_HCGDI_APPCONTROL to a non-zero value, using either a config file or the SoPreferences
class. When this variable is non-zero, the application is responsible for calling StartDoc, StartPage, EndPage and EndDoc to manage the printer. There are two modes, depending on the value of OIV_HCGDI_APPCONTROL:
SoVectorizeGDIAction
will set up the mapping as usual. This mode is only available in Open Inventor 7.2 and higher.
NOTE: When OIV_HCGDI_APPCONTROL is set, the methods that take parameters in physical units (e.g. millimeters) actually expect the values in current device units. For example, in this mode most applications call the GDI method SetMapMode() with HI_METRIC, meaning that device units are now .01 millimeter (provides better resolution for detailed drawings). As a result methods like setDrawingDimensions()
and setNominalWidth must now be called with HI_METRIC units. For 1 mm, pass the value 100.
Polygon edge width:
GDI uses a "brush" to draw the interior of a polygon and a "pen" to draw the edges of the polygon. By default the action uses a minimum width line for the polygon edges, but it is possible to specify the edge width by setting the environment variable OIV_HCGDI_EDGE_WIDTH (see SoPreferences
). Zero means minimum width. Values > 0 are a scale factor applied to the "nominalWidth" (see SoVectorizeAction.setNominalWidth
) similar to the line width set with SoDrawStyle.lineWidth
. This value is fetched in the constructor so it must be set before creating an SoVectorizeGDIAction
.
Limitations:
SoDrawStyle
) may result in previewing or printing solid lines though they remain patterned. It depends on how big gaps are in the pattern.
SoVectorizeAction
.
SoVectorizeAction.ColorTranslationMethods, SoVectorizeAction.DimensionUnits, SoVectorizeAction.EndLineStyles, SoVectorizeAction.HLHSRModes, SoVectorizeAction.JoinLineStyles, SoVectorizeAction.Orientations, SoVectorizeAction.ShadeModels
SoAction.AppliedCodes, SoAction.DistribModes, SoAction.PathCodes, SoAction.PathIndices
Inventor.ConstructorCommand
AS_IS, BEVELED_JOIN, BUTT_END, FLAT, HIDDEN_LINES_REMOVAL, HLHSR_PAINTER, HLHSR_PAINTER_SURFACE_REMOVAL, HLHSR_RASTER, HLHSR_SIMPLE_PAINTER, INCH, LANDSCAPE, METER, MITERED_BEVELED_JOIN, MITERED_JOIN, MM, NO_HLHSR, NO_JOIN, PORTRAIT, REVERSE, REVERSE_ONLY_BLACK_AND_WHITE, ROUND_END, ROUNDED_JOIN, SMOOTH, SQUARE_END, TRIANGULAR_END, TRIANGULAR_JOIN
ALL, BELOW_PATH, CLUSTER_ONLY, IN_PATH, LOCAL_ONLY, NO_PATH, NODE, OFF_PATH, PATH, PATH_LIST
VERBOSE_LEVEL, ZeroHandle
Constructor and Description |
---|
SoVectorizeGDIAction()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static void |
enableElement(java.lang.Class<? extends Inventor> t,
int stkIndex) |
SoGDIVectorOutput |
getGDIVectorOutput()
Returns the
SoGDIVectorOutput instance in action. |
boolean |
hasPrinter()
Returns true if the printer is set.
|
beginPage, beginPage, enableLighting, endPage, getBackgroundColor, getColorPriority, getColorTranslationMethod, getDrawingDimensions, getDrawingDimensions, getHLHSRMode, getHLHSRRasterCaching, getHLHSRRasterQuality, getLineEndStyle, getLineJoinsStyle, getLineOffset, getLinePatternSize, getLinePatternSize, getMarkerOffset, getMiterLimit, getNominalWidth, getNominalWidth, getOrientation, getPenNum, getPixelImageSize, getPixelImageSize, getPolygonOffset, getShadeModel, getStartPosition, getStartPosition, getVectorOutput, isLightingEnabled, setBackgroundColor, setBackgroundColor, setBorder, setBorder, setColorPriority, setColorTranslationMethod, setDrawingDimensions, setDrawingDimensions, setDrawingDimensions, setDrawingDimensions, setHLHSRMode, setHLHSRRasterCaching, setHLHSRRasterQuality, setLineEndStyle, setLineJoinsStyle, setLineOffset, setLinePatternSize, setLinePatternSize, setMarkerOffset, setMiterLimit, setNominalWidth, setNominalWidth, setOrientation, setPenDescription, setPenDescription, setPenDescription, setPenDescription, setPixelImageSize, setPixelImageSize, setPolygonOffset, setShadeModel, setStartPosition, setStartPosition, setStartPosition, setStartPosition
apply, apply, clearApplyResult, forwardTraversal, getContinueActionInBranchFlag, getCurPath, getNodeAppliedTo, getOriginalPathListAppliedTo, getPathAppliedTo, getPathCode, getPathListAppliedTo, getPipeId, getSceneManager, getState, getWhatAppliedTo, hasTerminated, invalidateState, isBeingApplied, isLastPathListAppliedTo, isUsingAlternateRep, nullAction, postDelayedTraversal, preDelayedTraversal, resetContinueActionInBranchFlag, setPipeId, setSceneManager, setUpState, stopActionInBranch, traverse, useAlternateRep
dispose, getAddress, getNativeResourceHandle, startInternalThreads, stopInternalThreads
public static void enableElement(java.lang.Class<? extends Inventor> t, int stkIndex)
public SoGDIVectorOutput getGDIVectorOutput()
SoGDIVectorOutput
instance in action.public boolean hasPrinter()
Generated on January 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com