VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkGL2PSExporter.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 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 vtkTypeMacro(vtkGL2PSExporter,vtkExporter); 00095 void PrintSelf(ostream& os, vtkIndent indent); 00096 00098 00101 vtkSetStringMacro(FilePrefix); 00102 vtkGetStringMacro(FilePrefix); 00104 00105 //BTX 00106 enum OutputFormat 00107 { 00108 PS_FILE, 00109 EPS_FILE, 00110 PDF_FILE, 00111 TEX_FILE, 00112 SVG_FILE 00113 }; 00114 //ETX 00115 00117 00121 vtkSetClampMacro(FileFormat, int, PS_FILE, SVG_FILE); 00122 vtkGetMacro(FileFormat, int); 00123 void SetFileFormatToPS() 00124 {this->SetFileFormat(PS_FILE);}; 00125 void SetFileFormatToEPS() 00126 {this->SetFileFormat(EPS_FILE);}; 00127 void SetFileFormatToPDF() 00128 {this->SetFileFormat(PDF_FILE);}; 00129 void SetFileFormatToTeX() 00130 {this->SetFileFormat(TEX_FILE);}; 00131 void SetFileFormatToSVG() 00132 {this->SetFileFormat(SVG_FILE);}; 00133 const char *GetFileFormatAsString(); 00135 00136 //BTX 00137 enum SortScheme 00138 { 00139 NO_SORT=0, 00140 SIMPLE_SORT=1, 00141 BSP_SORT=2 00142 }; 00143 //ETX 00144 00146 00149 vtkSetClampMacro(Sort, int, NO_SORT, BSP_SORT); 00150 vtkGetMacro(Sort,int); 00151 void SetSortToOff() 00152 {this->SetSort(NO_SORT);}; 00153 void SetSortToSimple() 00154 {this->SetSort(SIMPLE_SORT);}; 00155 void SetSortToBSP() 00156 {this->SetSort(BSP_SORT);}; 00157 const char *GetSortAsString(); 00159 00161 00163 vtkSetMacro(Compress, int); 00164 vtkGetMacro(Compress, int); 00165 vtkBooleanMacro(Compress, int); 00167 00169 00171 vtkSetMacro(DrawBackground, int); 00172 vtkGetMacro(DrawBackground, int); 00173 vtkBooleanMacro(DrawBackground, int); 00175 00177 00180 vtkSetMacro(SimpleLineOffset, int); 00181 vtkGetMacro(SimpleLineOffset, int); 00182 vtkBooleanMacro(SimpleLineOffset, int); 00184 00186 00188 vtkSetMacro(Silent, int); 00189 vtkGetMacro(Silent, int); 00190 vtkBooleanMacro(Silent, int); 00192 00194 00197 vtkSetMacro(BestRoot, int); 00198 vtkGetMacro(BestRoot, int); 00199 vtkBooleanMacro(BestRoot, int); 00201 00203 00206 vtkSetMacro(Text, int); 00207 vtkGetMacro(Text, int); 00208 vtkBooleanMacro(Text, int); 00210 00212 00214 vtkSetMacro(Landscape, int); 00215 vtkGetMacro(Landscape, int); 00216 vtkBooleanMacro(Landscape, int); 00218 00220 00223 vtkSetMacro(PS3Shading, int); 00224 vtkGetMacro(PS3Shading, int); 00225 vtkBooleanMacro(PS3Shading, int); 00227 00229 00232 vtkSetMacro(OcclusionCull, int); 00233 vtkGetMacro(OcclusionCull, int); 00234 vtkBooleanMacro(OcclusionCull, int); 00236 00238 00242 vtkSetMacro(Write3DPropsAsRasterImage, int); 00243 vtkGetMacro(Write3DPropsAsRasterImage, int); 00244 vtkBooleanMacro(Write3DPropsAsRasterImage, int); 00246 00248 00250 static void SetGlobalPointSizeFactor(float val); 00251 static float GetGlobalPointSizeFactor(); 00253 00255 00257 static void SetGlobalLineWidthFactor(float val); 00258 static float GetGlobalLineWidthFactor(); 00260 00261 protected: 00262 vtkGL2PSExporter(); 00263 ~vtkGL2PSExporter(); 00264 00265 void WriteData(); 00266 00267 char *FilePrefix; 00268 int FileFormat; 00269 int Sort; 00270 int Compress; 00271 int DrawBackground; 00272 int SimpleLineOffset; 00273 int Silent; 00274 int BestRoot; 00275 int Text; 00276 int Landscape; 00277 int PS3Shading; 00278 int OcclusionCull; 00279 int Write3DPropsAsRasterImage; 00280 00281 private: 00282 vtkGL2PSExporter(const vtkGL2PSExporter&); // Not implemented 00283 void operator=(const vtkGL2PSExporter&); // Not implemented 00284 }; 00285 00286 inline const char *vtkGL2PSExporter::GetSortAsString(void) 00287 { 00288 if ( this->Sort == NO_SORT ) 00289 { 00290 return "Off"; 00291 } 00292 else if ( this->Sort == SIMPLE_SORT ) 00293 { 00294 return "Simple"; 00295 } 00296 else 00297 { 00298 return "BSP"; 00299 } 00300 } 00301 00302 inline const char *vtkGL2PSExporter::GetFileFormatAsString(void) 00303 { 00304 if ( this->FileFormat == PS_FILE ) 00305 { 00306 return "PS"; 00307 } 00308 else if ( this->FileFormat == EPS_FILE ) 00309 { 00310 return "EPS"; 00311 } 00312 else if ( this->FileFormat == PDF_FILE ) 00313 { 00314 return "PDF"; 00315 } 00316 else if ( this->FileFormat == TEX_FILE ) 00317 { 00318 return "TeX"; 00319 } 00320 else 00321 { 00322 return "SVG"; 00323 } 00324 } 00325 00326 #endif