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 =========================================================================*/
80 #ifndef vtkGL2PSExporter_h
81 #define vtkGL2PSExporter_h
82 
83 #include "vtkIOExportModule.h" // For export macro
84 #include "vtkExporter.h"
85 
86 #include "vtkNew.h" // For vtkNew
87 
88 class vtkPropCollection;
89 
90 class VTKIOEXPORT_EXPORT vtkGL2PSExporter : public vtkExporter
91 {
92 public:
93  static vtkGL2PSExporter *New();
95  void PrintSelf(ostream& os, vtkIndent indent);
96 
98 
103  vtkSetStringMacro(FilePrefix);
104  vtkGetStringMacro(FilePrefix);
106 
108 
116  vtkSetMacro(BufferSize, int);
117  vtkGetMacro(BufferSize, int);
119 
121 
125  vtkSetStringMacro(Title);
126  vtkGetStringMacro(Title);
128 
130  {
135  SVG_FILE
136  };
137 
139 
147  {
148  this->SetSortToOff();
149  this->SetSimpleLineOffset(0);
150  }
152 
154 
160  vtkSetClampMacro(FileFormat, int, PS_FILE, SVG_FILE);
161  vtkGetMacro(FileFormat, int);
163  {this->SetFileFormat(PS_FILE);};
165  {this->SetFileFormat(EPS_FILE);};
167  {this->SetFileFormat(PDF_FILE);};
169  {this->SetFileFormat(TEX_FILE);};
171  {this->SetFileFormat(SVG_FILE);};
172  const char *GetFileFormatAsString();
174 
176  {
177  NO_SORT=0,
178  SIMPLE_SORT=1,
179  BSP_SORT=2
180  };
181 
183 
188  vtkSetClampMacro(Sort, int, NO_SORT, BSP_SORT);
189  vtkGetMacro(Sort,int);
191  {this->SetSort(NO_SORT);};
193  {this->SetSort(SIMPLE_SORT);};
195  {this->SetSort(BSP_SORT);};
196  const char *GetSortAsString();
198 
200 
204  vtkSetMacro(Compress, int);
205  vtkGetMacro(Compress, int);
206  vtkBooleanMacro(Compress, int);
208 
210 
215  vtkSetMacro(DrawBackground, int);
216  vtkGetMacro(DrawBackground, int);
217  vtkBooleanMacro(DrawBackground, int);
219 
221 
227  vtkSetMacro(SimpleLineOffset, int);
228  vtkGetMacro(SimpleLineOffset, int);
229  vtkBooleanMacro(SimpleLineOffset, int);
231 
233 
237  vtkSetMacro(Silent, int);
238  vtkGetMacro(Silent, int);
239  vtkBooleanMacro(Silent, int);
241 
243 
249  vtkSetMacro(BestRoot, int);
250  vtkGetMacro(BestRoot, int);
251  vtkBooleanMacro(BestRoot, int);
253 
255 
261  vtkSetMacro(Text, int);
262  vtkGetMacro(Text, int);
263  vtkBooleanMacro(Text, int);
265 
267 
271  vtkSetMacro(Landscape, int);
272  vtkGetMacro(Landscape, int);
273  vtkBooleanMacro(Landscape, int);
275 
277 
282  vtkSetMacro(PS3Shading, int);
283  vtkGetMacro(PS3Shading, int);
284  vtkBooleanMacro(PS3Shading, int);
286 
288 
293  vtkSetMacro(OcclusionCull, int);
294  vtkGetMacro(OcclusionCull, int);
295  vtkBooleanMacro(OcclusionCull, int);
297 
299 
307  vtkSetMacro(Write3DPropsAsRasterImage, int);
308  vtkGetMacro(Write3DPropsAsRasterImage, int);
309  vtkBooleanMacro(Write3DPropsAsRasterImage, int);
311 
313 
318  vtkSetMacro(TextAsPath, bool);
319  vtkGetMacro(TextAsPath, bool);
320  vtkBooleanMacro(TextAsPath, bool);
322 
324 
330  void SetRasterExclusions(vtkPropCollection*);
331  vtkGetObjectMacro(RasterExclusions, vtkPropCollection);
333 
335 
339  vtkSetMacro(PointSizeFactor, float);
340  vtkGetMacro(PointSizeFactor, float);
342 
344 
348  vtkSetMacro(LineWidthFactor, float);
349  vtkGetMacro(LineWidthFactor, float);
351 
352 protected:
354  ~vtkGL2PSExporter();
355 
356  int GetGL2PSOptions();
357  int GetGL2PSSort();
358  int GetGL2PSFormat();
359  const char *GetFileExtension();
360 
362 
363  char *FilePrefix;
364  char *Title;
367  int Sort;
368  int Compress;
371  int Silent;
372  int BestRoot;
373  int Text;
381 
382 private:
383  vtkGL2PSExporter(const vtkGL2PSExporter&) VTK_DELETE_FUNCTION;
384  void operator=(const vtkGL2PSExporter&) VTK_DELETE_FUNCTION;
385 };
386 
387 inline const char *vtkGL2PSExporter::GetSortAsString(void)
388 {
389  if ( this->Sort == NO_SORT )
390  {
391  return "Off";
392  }
393  else if ( this->Sort == SIMPLE_SORT )
394  {
395  return "Simple";
396  }
397  else
398  {
399  return "BSP";
400  }
401 }
402 
404 {
405  if ( this->FileFormat == PS_FILE )
406  {
407  return "PS";
408  }
409  else if ( this->FileFormat == EPS_FILE )
410  {
411  return "EPS";
412  }
413  else if ( this->FileFormat == PDF_FILE )
414  {
415  return "PDF";
416  }
417  else if ( this->FileFormat == TEX_FILE )
418  {
419  return "TeX";
420  }
421  else
422  {
423  return "SVG";
424  }
425 }
426 
427 #endif
void SetFileFormatToEPS()
Specify the format of file to write out.
abstract class to write a scene to a file
Definition: vtkExporter.h:46
void SetFileFormatToPDF()
Specify the format of file to write out.
export a scene as a PostScript file using GL2PS.
a list of Props
void SetSortToOff()
Set the the type of sorting algorithm to order primitives from back to front.
a simple class to control print indentation
Definition: vtkIndent.h:39
void SetSortToSimple()
Set the the type of sorting algorithm to order primitives from back to front.
void SetFileFormatToSVG()
Specify the format of file to write out.
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
const char * GetFileFormatAsString()
Specify the format of file to write out.
void SetFileFormatToPS()
Specify the format of file to write out.
void SetFileFormatToTeX()
Specify the format of file to write out.
void UsePainterSettings()
Configure the exporter to expect a painter-ordered 2D rendering, that is, a rendering at a fixed dept...
vtkPropCollection * RasterExclusions
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
void SetSortToBSP()
Set the the type of sorting algorithm to order primitives from back to front.