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=========================================================================*/
79
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
137
139
147 {
148 this->SetSortToOff();
149 this->SetSimpleLineOffset(0);
150 }
151
152
154
160 vtkSetClampMacro(FileFormat, int, PS_FILE, SVG_FILE);
161 vtkGetMacro(FileFormat, int);
167 const char* GetFileFormatAsString();
169
171 {
175 };
176
178
183 vtkSetClampMacro(Sort, int, NO_SORT, BSP_SORT);
184 vtkGetMacro(Sort, int);
185 void SetSortToOff() { this->SetSort(NO_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
209 vtkBooleanMacro(DrawBackground, vtkTypeBool);
211
213
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
287 vtkBooleanMacro(OcclusionCull, vtkTypeBool);
289
291
303
305
310 vtkSetMacro(TextAsPath, bool);
311 vtkGetMacro(TextAsPath, bool);
312 vtkBooleanMacro(TextAsPath, bool);
314
316
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
virtual void SetSimpleLineOffset(vtkTypeBool)
Turn on/off the GL2PS_SIMPLE_LINE_OFFSET option.
~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.
virtual void SetFileFormat(int)
Specify the format of file 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.
virtual void SetSort(int)
Set the type of sorting algorithm to order primitives from back to front.
a simple class to control print indentation
Definition vtkIndent.h:40
an ordered list of Props
int vtkTypeBool
Definition vtkABI.h:69