VTK  9.2.6
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 "vtkExporter.h"
84#include "vtkIOExportGL2PSModule.h" // For export macro
85
86#include "vtkNew.h" // For vtkNew
87
89
90class VTKIOEXPORTGL2PS_EXPORT vtkGL2PSExporter : public vtkExporter
91{
92public:
95 void PrintSelf(ostream& os, vtkIndent indent) override;
96
98
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);
162 void SetFileFormatToPS() { this->SetFileFormat(PS_FILE); }
163 void SetFileFormatToEPS() { this->SetFileFormat(EPS_FILE); }
164 void SetFileFormatToPDF() { this->SetFileFormat(PDF_FILE); }
165 void SetFileFormatToTeX() { this->SetFileFormat(TEX_FILE); }
166 void SetFileFormatToSVG() { this->SetFileFormat(SVG_FILE); }
167 const char* GetFileFormatAsString();
169
171 {
172 NO_SORT = 0,
173 SIMPLE_SORT = 1,
174 BSP_SORT = 2
175 };
176
178
183 vtkSetClampMacro(Sort, int, NO_SORT, BSP_SORT);
184 vtkGetMacro(Sort, int);
185 void SetSortToOff() { this->SetSort(NO_SORT); }
186 void SetSortToSimple() { this->SetSort(SIMPLE_SORT); }
187 void SetSortToBSP() { this->SetSort(BSP_SORT); }
188 const char* GetSortAsString();
190
192
196 vtkSetMacro(Compress, vtkTypeBool);
197 vtkGetMacro(Compress, vtkTypeBool);
198 vtkBooleanMacro(Compress, vtkTypeBool);
200
202
207 vtkSetMacro(DrawBackground, vtkTypeBool);
208 vtkGetMacro(DrawBackground, vtkTypeBool);
209 vtkBooleanMacro(DrawBackground, vtkTypeBool);
211
213
219 vtkSetMacro(SimpleLineOffset, vtkTypeBool);
220 vtkGetMacro(SimpleLineOffset, vtkTypeBool);
221 vtkBooleanMacro(SimpleLineOffset, vtkTypeBool);
223
225
229 vtkSetMacro(Silent, vtkTypeBool);
230 vtkGetMacro(Silent, vtkTypeBool);
231 vtkBooleanMacro(Silent, vtkTypeBool);
233
235
241 vtkSetMacro(BestRoot, vtkTypeBool);
242 vtkGetMacro(BestRoot, vtkTypeBool);
243 vtkBooleanMacro(BestRoot, vtkTypeBool);
245
247
253 vtkSetMacro(Text, vtkTypeBool);
254 vtkGetMacro(Text, vtkTypeBool);
255 vtkBooleanMacro(Text, vtkTypeBool);
257
259
263 vtkSetMacro(Landscape, vtkTypeBool);
264 vtkGetMacro(Landscape, vtkTypeBool);
265 vtkBooleanMacro(Landscape, vtkTypeBool);
267
269
274 vtkSetMacro(PS3Shading, vtkTypeBool);
275 vtkGetMacro(PS3Shading, vtkTypeBool);
276 vtkBooleanMacro(PS3Shading, vtkTypeBool);
278
280
285 vtkSetMacro(OcclusionCull, vtkTypeBool);
286 vtkGetMacro(OcclusionCull, vtkTypeBool);
287 vtkBooleanMacro(OcclusionCull, vtkTypeBool);
289
291
299 vtkSetMacro(Write3DPropsAsRasterImage, vtkTypeBool);
300 vtkGetMacro(Write3DPropsAsRasterImage, vtkTypeBool);
301 vtkBooleanMacro(Write3DPropsAsRasterImage, vtkTypeBool);
303
305
310 vtkSetMacro(TextAsPath, bool);
311 vtkGetMacro(TextAsPath, bool);
312 vtkBooleanMacro(TextAsPath, bool);
314
316
323 vtkGetObjectMacro(RasterExclusions, vtkPropCollection);
325
327
331 vtkSetMacro(PointSizeFactor, float);
332 vtkGetMacro(PointSizeFactor, float);
334
336
340 vtkSetMacro(LineWidthFactor, float);
341 vtkGetMacro(LineWidthFactor, float);
343
344protected:
347
351 const char* GetFileExtension();
352
354
356 char* Title;
359 int Sort;
373
374private:
375 vtkGL2PSExporter(const vtkGL2PSExporter&) = delete;
376 void operator=(const vtkGL2PSExporter&) = delete;
377};
378
379inline const char* vtkGL2PSExporter::GetSortAsString(void)
380{
381 if (this->Sort == NO_SORT)
382 {
383 return "Off";
384 }
385 else if (this->Sort == SIMPLE_SORT)
386 {
387 return "Simple";
388 }
389 else
390 {
391 return "BSP";
392 }
393}
394
396{
397 if (this->FileFormat == PS_FILE)
398 {
399 return "PS";
400 }
401 else if (this->FileFormat == EPS_FILE)
402 {
403 return "EPS";
404 }
405 else if (this->FileFormat == PDF_FILE)
406 {
407 return "PDF";
408 }
409 else if (this->FileFormat == TEX_FILE)
410 {
411 return "TeX";
412 }
413 else
414 {
415 return "SVG";
416 }
417}
418
419#endif
abstract class to write a scene to a file
Definition vtkExporter.h:48
export a scene as a PostScript file using GL2PS.
~vtkGL2PSExporter() override
vtkTypeBool DrawBackground
void SetSortToBSP()
Set the type of sorting algorithm to order primitives from back to front.
void SetFileFormatToSVG()
Specify the format of file to write out.
void SetFileFormatToPS()
Specify the format of file to write out.
vtkSetFilePathMacro(FilePrefix)
Specify the prefix of the files to write out.
vtkPropCollection * RasterExclusions
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkGetFilePathMacro(FilePrefix)
Specify the prefix of the files to write out.
void SetSortToOff()
Set the type of sorting algorithm to order primitives from back to front.
void SetRasterExclusions(vtkPropCollection *)
Collection of props to exclude from rasterization.
void SetFileFormatToTeX()
Specify the format of file to write out.
vtkTypeBool SimpleLineOffset
static vtkGL2PSExporter * New()
const char * GetFileFormatAsString()
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...
const char * GetFileExtension()
void SetFileFormatToPDF()
Specify the format of file to write out.
vtkTypeBool OcclusionCull
void SetSortToSimple()
Set the type of sorting algorithm to order primitives from back to front.
const char * GetSortAsString()
Set the type of sorting algorithm to order primitives from back to front.
vtkTypeBool Write3DPropsAsRasterImage
void SetFileFormatToEPS()
Specify the format of file to write out.
a simple class to control print indentation
Definition vtkIndent.h:40
an ordered list of Props
int vtkTypeBool
Definition vtkABI.h:69