1 #ifndef COIN_SOVECTORIZEACTION_H 2 #define COIN_SOVECTORIZEACTION_H 37 #include <Inventor/actions/SoSubAction.h> 38 #include <Inventor/SbVec2f.h> 39 #include <Inventor/SbColor.h> 43 class SoVectorizeItem;
44 class SoVectorizeActionP;
60 static void initClass(
void);
81 virtual void apply(
const SoPathList & pathlist, SbBool obeysrules = FALSE);
83 void beginStandardPage(
const PageSize & pagesize,
const float border = 10.0f);
85 virtual void beginPage(
const SbVec2f & startpagepos,
87 DimensionUnit u = MM);
88 virtual void endPage(
void);
92 virtual void beginViewport(
const SbVec2f & startpos =
SbVec2f(-1.0f, 1.0f),
94 DimensionUnit u = MM);
95 virtual void endViewport(
void);
97 virtual void setOrientation(Orientation o);
98 virtual Orientation getOrientation(
void)
const;
100 virtual void setBackgroundColor(SbBool bg,
const SbColor & col =
SbColor(0.0f, 0.0f, 0.0f));
101 virtual SbBool getBackgroundColor(
SbColor & col)
const;
103 virtual void setNominalWidth(
float w, DimensionUnit u = MM);
104 virtual float getNominalWidth(DimensionUnit u = MM)
const;
106 virtual void setPixelImageSize(
float w, DimensionUnit u = MM);
107 virtual float getPixelImageSize(DimensionUnit u = MM)
const;
114 virtual void setPointStyle(
const PointStyle & style);
115 virtual PointStyle getPointStyle(
void)
const;
117 const SbVec2f & getPageStartpos(
void)
const;
118 const SbVec2f & getPageSize(
void)
const;
122 enum ColorTranslationMethod { REVERSE_ONLY_BLACK_AND_WHITE, AS_IS, REVERSE };
124 enum JoinLineStyle { NO_JOIN, MITERED_JOIN, MITERED_BEVELED_JOIN,
125 BEVELED_JOIN, TRIANGULAR_JOIN, ROUNDED_JOIN } ;
126 enum EndLineStyle { BUTT_END, SQUARE_END, TRIANGULAR_END, ROUND_END };
127 enum HLHSRMode { NO_HLHSR, HLHSR_SIMPLE_PAINTER, HLHSR_PAINTER,
128 HLHSR_PAINTER_SURFACE_REMOVAL, HIDDEN_LINES_REMOVAL };
130 virtual void setDrawingDimensions(
const SbVec2f & d, DimensionUnit u = MM);
131 virtual void setDrawingDimensions(
float w,
float h, DimensionUnit u = MM) { this->setDrawingDimensions(
SbVec2f(w, h), u); }
132 virtual SbVec2f getDrawingDimensions(DimensionUnit u = MM)
const;
134 virtual void setStartPosition(
const SbVec2f & p, DimensionUnit u = MM);
135 virtual void setStartPosition(
float x,
float y, DimensionUnit u = MM) { this->setStartPosition(
SbVec2f(x, y), u); }
136 virtual SbVec2f getStartPosition(DimensionUnit u = MM)
const;
138 virtual void setColorTranslationMethod(ColorTranslationMethod method);
139 virtual ColorTranslationMethod getColorTranslationMethod(
void)
const;
141 virtual void setLineEndStyle(EndLineStyle style);
142 virtual EndLineStyle getLineEndStyle(
void)
const;
144 virtual void setLineJoinsStyle(JoinLineStyle style);
145 virtual JoinLineStyle getLineJoinsStyle(
void)
const;
147 virtual void setHLHSRMode(HLHSRMode mode);
148 HLHSRMode getHLHSRMode(
void)
const;
150 virtual void setBorder(
float width);
151 virtual void setBorder (
float width,
SbColor color);
153 virtual void setMiterLimit(
float limit);
154 virtual float getMiterLimit(
void)
const;
156 virtual void setPenDescription(
int num_pens,
158 const float * widths = 0,
159 DimensionUnit u = MM);
160 virtual void getPenDescription(
SbColor * colors,
162 DimensionUnit u = MM)
const;
163 virtual int getPenNum(
void)
const;
165 virtual void setColorPriority(SbBool priority);
166 virtual SbBool getColorPriority(
void)
const;
168 virtual void enableLighting(SbBool flag);
169 SbBool isLightingEnabled(
void)
const;
174 virtual float pixelsToUnits(
const int pixels);
175 virtual void printHeader(
void)
const = 0;
176 virtual void printFooter(
void)
const;
177 virtual void printBackground(
void)
const;
178 virtual void printItem(
const SoVectorizeItem * item)
const = 0;
179 virtual void printViewport(
void)
const;
181 SbVec2f getRotatedViewportStartpos(
void)
const;
182 SbVec2f getRotatedViewportSize(
void)
const;
184 const SbBSPTree & getBSPTree(
void)
const;
187 SoVectorizeActionP * pimpl;
188 friend class SoVectorizeActionP;
193 #ifndef COIN_INTERNAL 195 #include <Inventor/nodes/SoImage.h> 196 #endif // COIN_INTERNAL 200 #endif // !COIN_SOVECTORIZEACTION_H The SbVec2f class is a 2 dimensional vector with floating point coordinates.
Definition: SbVec2f.h:49
The SbColor class contains the red, green and blue components which make up a color value...
Definition: SbColor.h:39
Definition: SoVectorizeAction.h:110
The SoVectorizeAction class is the base class for vectorizing Coin scene graphs.
Definition: SoVectorizeAction.h:49
The SoPathList class is a container for pointers to SoPath objects.
Definition: SoPathList.h:40
Definition: SoVectorizeAction.h:67
The SoNode class is the base class for nodes used in scene graphs.
Definition: SoNode.h:56
Definition: SoVectorizeAction.h:75
DimensionUnit
Definition: SoVectorizeAction.h:62
The SbBSPTree class provides a binary space partitioning container.
Definition: SbBSPTree.h:54
The SoVectorOutput class is used for setting vector output file.
Definition: SoVectorOutput.h:43
The SoPath class is a container class for traversal path descriptions.
Definition: SoPath.h:52
Definition: SoVectorizeAction.h:73
PointStyle
Definition: SoVectorizeAction.h:109
The SoAction class is the base class for all traversal actions.
Definition: SoAction.h:77
Orientation
Definition: SoVectorizeAction.h:63
Definition: SoVectorizeAction.h:72
Definition: SoVectorizeAction.h:68
Definition: SoVectorizeAction.h:74
Definition: SoVectorizeAction.h:71
The SoCallbackAction class invokes callbacks at specific nodes.
Definition: SoCallbackAction.h:80
The SbViewportRegion class is a viewport within a full window.
Definition: SbViewportRegion.h:40
PageSize
Definition: SoVectorizeAction.h:65
virtual void apply(SoNode *root)
Definition: SoAction.cpp:463
Definition: SoVectorizeAction.h:69
Definition: SoVectorizeAction.h:70