00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00085 #ifndef __vtkGL2PSExporter_h
00086 #define __vtkGL2PSExporter_h
00087
00088 #include "vtkExporter.h"
00089
00090 class VTK_RENDERING_EXPORT vtkGL2PSExporter : public vtkExporter
00091 {
00092 public:
00093 static vtkGL2PSExporter *New();
00094 vtkTypeRevisionMacro(vtkGL2PSExporter,vtkExporter);
00095 void PrintSelf(ostream& os, vtkIndent indent);
00096
00098
00101 vtkSetStringMacro(FilePrefix);
00102 vtkGetStringMacro(FilePrefix);
00104
00105
00106 enum OutputFormat
00107 {
00108 PS_FILE,
00109 EPS_FILE,
00110 PDF_FILE,
00111 TEX_FILE
00112 };
00113
00114
00116
00120 vtkSetClampMacro(FileFormat, int, PS_FILE, TEX_FILE);
00121 vtkGetMacro(FileFormat, int);
00122 void SetFileFormatToPS()
00123 {this->SetFileFormat(PS_FILE);};
00124 void SetFileFormatToEPS()
00125 {this->SetFileFormat(EPS_FILE);};
00126 void SetFileFormatToPDF()
00127 {this->SetFileFormat(PDF_FILE);};
00128 void SetFileFormatToTeX()
00129 {this->SetFileFormat(TEX_FILE);};
00130 char *GetFileFormatAsString();
00132
00133
00134 enum SortScheme
00135 {
00136 NO_SORT=0,
00137 SIMPLE_SORT=1,
00138 BSP_SORT=2
00139 };
00140
00141
00143
00146 vtkSetClampMacro(Sort, int, NO_SORT, BSP_SORT);
00147 vtkGetMacro(Sort,int);
00148 void SetSortToOff()
00149 {this->SetSort(NO_SORT);};
00150 void SetSortToSimple()
00151 {this->SetSort(SIMPLE_SORT);};
00152 void SetSortToBSP()
00153 {this->SetSort(BSP_SORT);};
00154 char *GetSortAsString();
00156
00158
00160 vtkSetMacro(Compress, int);
00161 vtkGetMacro(Compress, int);
00162 vtkBooleanMacro(Compress, int);
00164
00166
00168 vtkSetMacro(DrawBackground, int);
00169 vtkGetMacro(DrawBackground, int);
00170 vtkBooleanMacro(DrawBackground, int);
00172
00174
00177 vtkSetMacro(SimpleLineOffset, int);
00178 vtkGetMacro(SimpleLineOffset, int);
00179 vtkBooleanMacro(SimpleLineOffset, int);
00181
00183
00185 vtkSetMacro(Silent, int);
00186 vtkGetMacro(Silent, int);
00187 vtkBooleanMacro(Silent, int);
00189
00191
00194 vtkSetMacro(BestRoot, int);
00195 vtkGetMacro(BestRoot, int);
00196 vtkBooleanMacro(BestRoot, int);
00198
00200
00203 vtkSetMacro(Text, int);
00204 vtkGetMacro(Text, int);
00205 vtkBooleanMacro(Text, int);
00207
00209
00211 vtkSetMacro(Landscape, int);
00212 vtkGetMacro(Landscape, int);
00213 vtkBooleanMacro(Landscape, int);
00215
00217
00220 vtkSetMacro(PS3Shading, int);
00221 vtkGetMacro(PS3Shading, int);
00222 vtkBooleanMacro(PS3Shading, int);
00224
00226
00229 vtkSetMacro(OcclusionCull, int);
00230 vtkGetMacro(OcclusionCull, int);
00231 vtkBooleanMacro(OcclusionCull, int);
00233
00235
00239 vtkSetMacro(Write3DPropsAsRasterImage, int);
00240 vtkGetMacro(Write3DPropsAsRasterImage, int);
00241 vtkBooleanMacro(Write3DPropsAsRasterImage, int);
00243
00245
00247 static void SetGlobalPointSizeFactor(float val);
00248 static float GetGlobalPointSizeFactor();
00250
00252
00254 static void SetGlobalLineWidthFactor(float val);
00255 static float GetGlobalLineWidthFactor();
00257
00258 protected:
00259 vtkGL2PSExporter();
00260 ~vtkGL2PSExporter();
00261
00262 void WriteData();
00263
00264 char *FilePrefix;
00265 int FileFormat;
00266 int Sort;
00267 int Compress;
00268 int DrawBackground;
00269 int SimpleLineOffset;
00270 int Silent;
00271 int BestRoot;
00272 int Text;
00273 int Landscape;
00274 int PS3Shading;
00275 int OcclusionCull;
00276 int Write3DPropsAsRasterImage;
00277
00278 private:
00279 vtkGL2PSExporter(const vtkGL2PSExporter&);
00280 void operator=(const vtkGL2PSExporter&);
00281 };
00282
00283 inline char *vtkGL2PSExporter::GetSortAsString(void)
00284 {
00285 if ( this->Sort == NO_SORT )
00286 {
00287 return (char *)"Off";
00288 }
00289 else if ( this->Sort == SIMPLE_SORT )
00290 {
00291 return (char *)"Simple";
00292 }
00293 else
00294 {
00295 return (char *)"BSP";
00296 }
00297 }
00298
00299 inline char *vtkGL2PSExporter::GetFileFormatAsString(void)
00300 {
00301 if ( this->FileFormat == PS_FILE )
00302 {
00303 return (char *)"PS";
00304 }
00305 else if ( this->FileFormat == EPS_FILE )
00306 {
00307 return (char *)"EPS";
00308 }
00309 else if ( this->FileFormat == PDF_FILE )
00310 {
00311 return (char *)"PDF";
00312 }
00313 else
00314 {
00315 return (char *)"TeX";
00316 }
00317 }
00318
00319 #endif