Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkGL2PSExporter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkGL2PSExporter.h,v $
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 =========================================================================*/
00092 #ifndef __vtkGL2PSExporter_h
00093 #define __vtkGL2PSExporter_h
00094 
00095 #include "vtkExporter.h"
00096 
00097 class VTK_RENDERING_EXPORT vtkGL2PSExporter : public vtkExporter
00098 {
00099 public:
00100   static vtkGL2PSExporter *New();
00101   vtkTypeRevisionMacro(vtkGL2PSExporter,vtkExporter);
00102   void PrintSelf(ostream& os, vtkIndent indent);
00103 
00105 
00108   vtkSetStringMacro(FilePrefix);
00109   vtkGetStringMacro(FilePrefix);
00111 
00112 //BTX
00113   enum OutputFormat
00114   {
00115       PS_FILE,
00116       EPS_FILE,
00117       PDF_FILE,
00118       TEX_FILE
00119   };
00120 //ETX
00121 
00123 
00127   vtkSetClampMacro(FileFormat, int, PS_FILE, TEX_FILE);
00128   vtkGetMacro(FileFormat, int);
00129   void SetFileFormatToPS()
00130     {this->SetFileFormat(PS_FILE);};
00131   void SetFileFormatToEPS()
00132     {this->SetFileFormat(EPS_FILE);};
00133   void SetFileFormatToPDF()
00134     {this->SetFileFormat(PDF_FILE);};
00135   void SetFileFormatToTeX()
00136     {this->SetFileFormat(TEX_FILE);};
00137   char *GetFileFormatAsString();
00139 
00140 //BTX
00141   enum SortScheme
00142   {
00143       NO_SORT=0,
00144       SIMPLE_SORT=1,
00145       BSP_SORT=2
00146   };
00147 //ETX
00148 
00150 
00153   vtkSetClampMacro(Sort, int, NO_SORT, BSP_SORT);
00154   vtkGetMacro(Sort,int);
00155   void SetSortToOff()
00156     {this->SetSort(NO_SORT);};
00157   void SetSortToSimple() 
00158     {this->SetSort(SIMPLE_SORT);};
00159   void SetSortToBSP() 
00160     {this->SetSort(BSP_SORT);};
00161   char *GetSortAsString();
00163 
00165 
00167   vtkSetMacro(Compress, int);
00168   vtkGetMacro(Compress, int);
00169   vtkBooleanMacro(Compress, int);
00171 
00173 
00175   vtkSetMacro(DrawBackground, int);
00176   vtkGetMacro(DrawBackground, int);
00177   vtkBooleanMacro(DrawBackground, int);
00179 
00181 
00184   vtkSetMacro(SimpleLineOffset, int);
00185   vtkGetMacro(SimpleLineOffset, int);
00186   vtkBooleanMacro(SimpleLineOffset, int);
00188 
00190 
00192   vtkSetMacro(Silent, int);
00193   vtkGetMacro(Silent, int);
00194   vtkBooleanMacro(Silent, int);
00196 
00198 
00201   vtkSetMacro(BestRoot, int);
00202   vtkGetMacro(BestRoot, int);
00203   vtkBooleanMacro(BestRoot, int);
00205 
00207 
00210   vtkSetMacro(Text, int);
00211   vtkGetMacro(Text, int);
00212   vtkBooleanMacro(Text, int);
00214   
00216 
00218   vtkSetMacro(Landscape, int);
00219   vtkGetMacro(Landscape, int);
00220   vtkBooleanMacro(Landscape, int);
00222 
00224 
00227   vtkSetMacro(PS3Shading, int);
00228   vtkGetMacro(PS3Shading, int);
00229   vtkBooleanMacro(PS3Shading, int);
00231 
00233 
00236   vtkSetMacro(OcclusionCull, int);
00237   vtkGetMacro(OcclusionCull, int);
00238   vtkBooleanMacro(OcclusionCull, int);
00240 
00242 
00246   vtkSetMacro(Write3DPropsAsRasterImage, int);
00247   vtkGetMacro(Write3DPropsAsRasterImage, int);
00248   vtkBooleanMacro(Write3DPropsAsRasterImage, int);
00250 
00252 
00254   static void SetGlobalPointSizeFactor(float val);
00255   static float GetGlobalPointSizeFactor();
00257 
00259 
00261   static void SetGlobalLineWidthFactor(float val);
00262   static float GetGlobalLineWidthFactor();
00264 
00265 protected:
00266   vtkGL2PSExporter();
00267   ~vtkGL2PSExporter();
00268 
00269   void WriteData();
00270 
00271   char *FilePrefix;
00272   int FileFormat;
00273   int Sort;
00274   int Compress;
00275   int DrawBackground;
00276   int SimpleLineOffset;
00277   int Silent;
00278   int BestRoot;
00279   int Text;
00280   int Landscape;
00281   int PS3Shading;
00282   int OcclusionCull;
00283   int Write3DPropsAsRasterImage;
00284   
00285 private:
00286   vtkGL2PSExporter(const vtkGL2PSExporter&); // Not implemented
00287   void operator=(const vtkGL2PSExporter&); // Not implemented
00288 };
00289 
00290 inline char *vtkGL2PSExporter::GetSortAsString(void)
00291 {
00292   if ( this->Sort == NO_SORT )
00293     {
00294     return (char *)"Off";
00295     }
00296   else if ( this->Sort == SIMPLE_SORT )
00297     {
00298     return (char *)"Simple";
00299     }
00300   else
00301     {
00302     return (char *)"BSP";
00303     }
00304 }
00305 
00306 inline char *vtkGL2PSExporter::GetFileFormatAsString(void)
00307 {
00308   if ( this->FileFormat == PS_FILE )
00309     {
00310     return (char *)"PS";
00311     }
00312   else if ( this->FileFormat == EPS_FILE )
00313     {
00314     return (char *)"EPS";
00315     }
00316   else if ( this->FileFormat == PDF_FILE )
00317     {
00318     return (char *)"PDF";
00319     }
00320   else
00321     {
00322     return (char *)"TeX";
00323     }
00324 }
00325 
00326 #endif