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);
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 
262  vtkGetMacro(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 
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:
355 
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
vtkX3D::Text
@ Text
Definition: vtkX3D.h:160
vtkGL2PSExporter::SetFileFormatToSVG
void SetFileFormatToSVG()
Definition: vtkGL2PSExporter.h:170
vtkGL2PSExporter::PDF_FILE
@ PDF_FILE
Definition: vtkGL2PSExporter.h:133
vtkGL2PSExporter::New
static vtkGL2PSExporter * New()
vtkGL2PSExporter::GetGL2PSFormat
int GetGL2PSFormat()
vtkGL2PSExporter::GetGL2PSOptions
int GetGL2PSOptions()
vtkGL2PSExporter::PointSizeFactor
float PointSizeFactor
Definition: vtkGL2PSExporter.h:379
vtkGL2PSExporter::DrawBackground
int DrawBackground
Definition: vtkGL2PSExporter.h:369
vtkGL2PSExporter::SetRasterExclusions
void SetRasterExclusions(vtkPropCollection *)
Collection of props to exclude from rasterization.
vtkGL2PSExporter::vtkGL2PSExporter
vtkGL2PSExporter()
vtkGL2PSExporter::RasterExclusions
vtkPropCollection * RasterExclusions
Definition: vtkGL2PSExporter.h:361
vtkGL2PSExporter::GetFileFormatAsString
const char * GetFileFormatAsString()
Definition: vtkGL2PSExporter.h:403
vtkGL2PSExporter::PS3Shading
int PS3Shading
Definition: vtkGL2PSExporter.h:375
vtkGL2PSExporter
export a scene as a PostScript file using GL2PS.
Definition: vtkGL2PSExporter.h:91
vtkGL2PSExporter::FilePrefix
char * FilePrefix
Definition: vtkGL2PSExporter.h:363
vtkGL2PSExporter::FileFormat
int FileFormat
Definition: vtkGL2PSExporter.h:365
vtkGL2PSExporter::SetFileFormatToTeX
void SetFileFormatToTeX()
Definition: vtkGL2PSExporter.h:168
vtkGL2PSExporter::SetFileFormatToPS
void SetFileFormatToPS()
Definition: vtkGL2PSExporter.h:162
vtkGL2PSExporter::BufferSize
int BufferSize
Definition: vtkGL2PSExporter.h:366
vtkGL2PSExporter::SIMPLE_SORT
@ SIMPLE_SORT
Definition: vtkGL2PSExporter.h:178
vtkGL2PSExporter::TextAsPath
bool TextAsPath
Definition: vtkGL2PSExporter.h:378
vtkGL2PSExporter::UsePainterSettings
void UsePainterSettings()
Configure the exporter to expect a painter-ordered 2D rendering, that is, a rendering at a fixed dept...
Definition: vtkGL2PSExporter.h:146
vtkGL2PSExporter::Title
char * Title
Definition: vtkGL2PSExporter.h:364
vtkGL2PSExporter::Silent
int Silent
Definition: vtkGL2PSExporter.h:371
vtkGL2PSExporter::Write3DPropsAsRasterImage
int Write3DPropsAsRasterImage
Definition: vtkGL2PSExporter.h:377
vtkGL2PSExporter::SetFileFormatToEPS
void SetFileFormatToEPS()
Definition: vtkGL2PSExporter.h:164
vtkGL2PSExporter::SetSortToBSP
void SetSortToBSP()
Definition: vtkGL2PSExporter.h:194
vtkGL2PSExporter::GetSortAsString
const char * GetSortAsString()
Definition: vtkGL2PSExporter.h:387
vtkGL2PSExporter::GetGL2PSSort
int GetGL2PSSort()
vtkGL2PSExporter::Landscape
int Landscape
Definition: vtkGL2PSExporter.h:374
vtkGL2PSExporter::SetFileFormatToPDF
void SetFileFormatToPDF()
Definition: vtkGL2PSExporter.h:166
vtkGL2PSExporter::GetFileExtension
const char * GetFileExtension()
vtkGL2PSExporter::SortScheme
SortScheme
Definition: vtkGL2PSExporter.h:176
vtkGL2PSExporter::EPS_FILE
@ EPS_FILE
Definition: vtkGL2PSExporter.h:132
vtkGL2PSExporter::LineWidthFactor
float LineWidthFactor
Definition: vtkGL2PSExporter.h:380
vtkGL2PSExporter::PS_FILE
@ PS_FILE
Definition: vtkGL2PSExporter.h:131
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkGL2PSExporter::NO_SORT
@ NO_SORT
Definition: vtkGL2PSExporter.h:177
vtkGetStringMacro
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
vtkGL2PSExporter::~vtkGL2PSExporter
~vtkGL2PSExporter()
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkGL2PSExporter::TEX_FILE
@ TEX_FILE
Definition: vtkGL2PSExporter.h:134
vtkNew.h
vtkExporter
abstract class to write a scene to a file
Definition: vtkExporter.h:47
vtkGL2PSExporter::SimpleLineOffset
int SimpleLineOffset
Definition: vtkGL2PSExporter.h:370
vtkGL2PSExporter::Sort
int Sort
Definition: vtkGL2PSExporter.h:367
vtkGL2PSExporter::OcclusionCull
int OcclusionCull
Definition: vtkGL2PSExporter.h:376
vtkGL2PSExporter::OutputFormat
OutputFormat
Definition: vtkGL2PSExporter.h:130
vtkExporter.h
vtkGL2PSExporter::BestRoot
int BestRoot
Definition: vtkGL2PSExporter.h:372
vtkGL2PSExporter::Text
int Text
Definition: vtkGL2PSExporter.h:373
vtkPropCollection
a list of Props
Definition: vtkPropCollection.h:39
vtkGL2PSExporter::SetSortToOff
void SetSortToOff()
Definition: vtkGL2PSExporter.h:190
vtkGL2PSExporter::SetSortToSimple
void SetSortToSimple()
Definition: vtkGL2PSExporter.h:192
vtkGL2PSExporter::Compress
int Compress
Definition: vtkGL2PSExporter.h:368