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 "vtkExporter.h"
89 
91 {
92 public:
93  static vtkGL2PSExporter *New();
95  void PrintSelf(ostream& os, vtkIndent indent);
96 
98 
101  vtkSetStringMacro(FilePrefix);
102  vtkGetStringMacro(FilePrefix);
104 
105 //BTX
107  {
112  SVG_FILE
113  };
114 //ETX
115 
117 
121  vtkSetClampMacro(FileFormat, int, PS_FILE, SVG_FILE);
122  vtkGetMacro(FileFormat, int);
123  void SetFileFormatToPS()
124  {this->SetFileFormat(PS_FILE);};
125  void SetFileFormatToEPS()
126  {this->SetFileFormat(EPS_FILE);};
127  void SetFileFormatToPDF()
128  {this->SetFileFormat(PDF_FILE);};
129  void SetFileFormatToTeX()
130  {this->SetFileFormat(TEX_FILE);};
131  void SetFileFormatToSVG()
132  {this->SetFileFormat(SVG_FILE);};
133  const char *GetFileFormatAsString();
135 
136 //BTX
138  {
139  NO_SORT=0,
140  SIMPLE_SORT=1,
141  BSP_SORT=2
142  };
143 //ETX
144 
146 
149  vtkSetClampMacro(Sort, int, NO_SORT, BSP_SORT);
150  vtkGetMacro(Sort,int);
151  void SetSortToOff()
152  {this->SetSort(NO_SORT);};
153  void SetSortToSimple()
154  {this->SetSort(SIMPLE_SORT);};
155  void SetSortToBSP()
156  {this->SetSort(BSP_SORT);};
157  const char *GetSortAsString();
159 
161 
163  vtkSetMacro(Compress, int);
164  vtkGetMacro(Compress, int);
165  vtkBooleanMacro(Compress, int);
167 
169 
171  vtkSetMacro(DrawBackground, int);
172  vtkGetMacro(DrawBackground, int);
173  vtkBooleanMacro(DrawBackground, int);
175 
177 
180  vtkSetMacro(SimpleLineOffset, int);
181  vtkGetMacro(SimpleLineOffset, int);
182  vtkBooleanMacro(SimpleLineOffset, int);
184 
186 
188  vtkSetMacro(Silent, int);
189  vtkGetMacro(Silent, int);
190  vtkBooleanMacro(Silent, int);
192 
194 
197  vtkSetMacro(BestRoot, int);
198  vtkGetMacro(BestRoot, int);
199  vtkBooleanMacro(BestRoot, int);
201 
203 
206  vtkSetMacro(Text, int);
207  vtkGetMacro(Text, int);
208  vtkBooleanMacro(Text, int);
210 
212 
214  vtkSetMacro(Landscape, int);
215  vtkGetMacro(Landscape, int);
216  vtkBooleanMacro(Landscape, int);
218 
220 
223  vtkSetMacro(PS3Shading, int);
224  vtkGetMacro(PS3Shading, int);
225  vtkBooleanMacro(PS3Shading, int);
227 
229 
232  vtkSetMacro(OcclusionCull, int);
233  vtkGetMacro(OcclusionCull, int);
234  vtkBooleanMacro(OcclusionCull, int);
236 
238 
242  vtkSetMacro(Write3DPropsAsRasterImage, int);
243  vtkGetMacro(Write3DPropsAsRasterImage, int);
244  vtkBooleanMacro(Write3DPropsAsRasterImage, int);
246 
248 
250  static void SetGlobalPointSizeFactor(float val);
251  static float GetGlobalPointSizeFactor();
253 
255 
257  static void SetGlobalLineWidthFactor(float val);
258  static float GetGlobalLineWidthFactor();
260 
261 protected:
263  ~vtkGL2PSExporter();
264 
265  void WriteData();
266 
267  char *FilePrefix;
269  int Sort;
270  int Compress;
273  int Silent;
274  int BestRoot;
275  int Text;
280 
281 private:
282  vtkGL2PSExporter(const vtkGL2PSExporter&); // Not implemented
283  void operator=(const vtkGL2PSExporter&); // Not implemented
284 };
285 
286 inline const char *vtkGL2PSExporter::GetSortAsString(void)
287 {
288  if ( this->Sort == NO_SORT )
289  {
290  return "Off";
291  }
292  else if ( this->Sort == SIMPLE_SORT )
293  {
294  return "Simple";
295  }
296  else
297  {
298  return "BSP";
299  }
300 }
301 
303 {
304  if ( this->FileFormat == PS_FILE )
305  {
306  return "PS";
307  }
308  else if ( this->FileFormat == EPS_FILE )
309  {
310  return "EPS";
311  }
312  else if ( this->FileFormat == PDF_FILE )
313  {
314  return "PDF";
315  }
316  else if ( this->FileFormat == TEX_FILE )
317  {
318  return "TeX";
319  }
320  else
321  {
322  return "SVG";
323  }
324 }
325 
326 #endif