VTK
vtkGL2PSExporter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkGL2PSExporter.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
85 #ifndef __vtkGL2PSExporter_h
86 #define __vtkGL2PSExporter_h
87 
88 #include "vtkIOExportModule.h" // For export macro
89 #include "vtkExporter.h"
90 
91 class VTKIOEXPORT_EXPORT vtkGL2PSExporter : public vtkExporter
92 {
93 public:
94  static vtkGL2PSExporter *New();
96  void PrintSelf(ostream& os, vtkIndent indent);
97 
99 
102  vtkSetStringMacro(FilePrefix);
103  vtkGetStringMacro(FilePrefix);
105 
106 //BTX
108  {
113  SVG_FILE
114  };
115 //ETX
116 
118 
122  vtkSetClampMacro(FileFormat, int, PS_FILE, SVG_FILE);
123  vtkGetMacro(FileFormat, int);
124  void SetFileFormatToPS()
125  {this->SetFileFormat(PS_FILE);};
126  void SetFileFormatToEPS()
127  {this->SetFileFormat(EPS_FILE);};
128  void SetFileFormatToPDF()
129  {this->SetFileFormat(PDF_FILE);};
130  void SetFileFormatToTeX()
131  {this->SetFileFormat(TEX_FILE);};
132  void SetFileFormatToSVG()
133  {this->SetFileFormat(SVG_FILE);};
134  const char *GetFileFormatAsString();
136 
137 //BTX
139  {
140  NO_SORT=0,
141  SIMPLE_SORT=1,
142  BSP_SORT=2
143  };
144 //ETX
145 
147 
150  vtkSetClampMacro(Sort, int, NO_SORT, BSP_SORT);
151  vtkGetMacro(Sort,int);
152  void SetSortToOff()
153  {this->SetSort(NO_SORT);};
154  void SetSortToSimple()
155  {this->SetSort(SIMPLE_SORT);};
156  void SetSortToBSP()
157  {this->SetSort(BSP_SORT);};
158  const char *GetSortAsString();
160 
162 
164  vtkSetMacro(Compress, int);
165  vtkGetMacro(Compress, int);
166  vtkBooleanMacro(Compress, int);
168 
170 
172  vtkSetMacro(DrawBackground, int);
173  vtkGetMacro(DrawBackground, int);
174  vtkBooleanMacro(DrawBackground, int);
176 
178 
181  vtkSetMacro(SimpleLineOffset, int);
182  vtkGetMacro(SimpleLineOffset, int);
183  vtkBooleanMacro(SimpleLineOffset, int);
185 
187 
189  vtkSetMacro(Silent, int);
190  vtkGetMacro(Silent, int);
191  vtkBooleanMacro(Silent, int);
193 
195 
198  vtkSetMacro(BestRoot, int);
199  vtkGetMacro(BestRoot, int);
200  vtkBooleanMacro(BestRoot, int);
202 
204 
207  vtkSetMacro(Text, int);
208  vtkGetMacro(Text, int);
209  vtkBooleanMacro(Text, int);
211 
213 
215  vtkSetMacro(Landscape, int);
216  vtkGetMacro(Landscape, int);
217  vtkBooleanMacro(Landscape, int);
219 
221 
224  vtkSetMacro(PS3Shading, int);
225  vtkGetMacro(PS3Shading, int);
226  vtkBooleanMacro(PS3Shading, int);
228 
230 
233  vtkSetMacro(OcclusionCull, int);
234  vtkGetMacro(OcclusionCull, int);
235  vtkBooleanMacro(OcclusionCull, int);
237 
239 
243  vtkSetMacro(Write3DPropsAsRasterImage, int);
244  vtkGetMacro(Write3DPropsAsRasterImage, int);
245  vtkBooleanMacro(Write3DPropsAsRasterImage, int);
247 
249 
251  static void SetGlobalPointSizeFactor(float val);
252  static float GetGlobalPointSizeFactor();
254 
256 
258  static void SetGlobalLineWidthFactor(float val);
259  static float GetGlobalLineWidthFactor();
261 
262 protected:
264  ~vtkGL2PSExporter();
265 
266  void WriteData();
267 
268  char *FilePrefix;
270  int Sort;
271  int Compress;
274  int Silent;
275  int BestRoot;
276  int Text;
281 
282 private:
283  vtkGL2PSExporter(const vtkGL2PSExporter&); // Not implemented
284  void operator=(const vtkGL2PSExporter&); // Not implemented
285 };
286 
287 inline const char *vtkGL2PSExporter::GetSortAsString(void)
288 {
289  if ( this->Sort == NO_SORT )
290  {
291  return "Off";
292  }
293  else if ( this->Sort == SIMPLE_SORT )
294  {
295  return "Simple";
296  }
297  else
298  {
299  return "BSP";
300  }
301 }
302 
304 {
305  if ( this->FileFormat == PS_FILE )
306  {
307  return "PS";
308  }
309  else if ( this->FileFormat == EPS_FILE )
310  {
311  return "EPS";
312  }
313  else if ( this->FileFormat == PDF_FILE )
314  {
315  return "PDF";
316  }
317  else if ( this->FileFormat == TEX_FILE )
318  {
319  return "TeX";
320  }
321  else
322  {
323  return "SVG";
324  }
325 }
326 
327 #endif