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=========================================================================*/
76
77#ifndef vtkGL2PSExporter_h
78#define vtkGL2PSExporter_h
79
80#include "vtkExporter.h"
81#include "vtkIOExportGL2PSModule.h" // For export macro
82
83#include "vtkNew.h" // For vtkNew
84
86
87class VTKIOEXPORTGL2PS_EXPORT vtkGL2PSExporter : public vtkExporter
88{
89public:
92 void PrintSelf(ostream& os, vtkIndent indent) override;
93
95
103
105
113 vtkSetMacro(BufferSize, int);
114 vtkGetMacro(BufferSize, int);
116
118
122 vtkSetStringMacro(Title);
123 vtkGetStringMacro(Title);
125
134
136
144 {
145 this->SetSortToOff();
146 this->SetSimpleLineOffset(0);
147 }
148
149
151
157 vtkSetClampMacro(FileFormat, int, PS_FILE, SVG_FILE);
158 vtkGetMacro(FileFormat, int);
164 const char* GetFileFormatAsString();
166
168 {
172 };
173
175
180 vtkSetClampMacro(Sort, int, NO_SORT, BSP_SORT);
181 vtkGetMacro(Sort, int);
182 void SetSortToOff() { this->SetSort(NO_SORT); }
184 void SetSortToBSP() { this->SetSort(BSP_SORT); }
185 const char* GetSortAsString();
187
189
193 vtkSetMacro(Compress, vtkTypeBool);
194 vtkGetMacro(Compress, vtkTypeBool);
195 vtkBooleanMacro(Compress, vtkTypeBool);
197
199
206 vtkBooleanMacro(DrawBackground, vtkTypeBool);
208
210
218 vtkBooleanMacro(SimpleLineOffset, vtkTypeBool);
220
222
226 vtkSetMacro(Silent, vtkTypeBool);
227 vtkGetMacro(Silent, vtkTypeBool);
228 vtkBooleanMacro(Silent, vtkTypeBool);
230
232
238 vtkSetMacro(BestRoot, vtkTypeBool);
239 vtkGetMacro(BestRoot, vtkTypeBool);
240 vtkBooleanMacro(BestRoot, vtkTypeBool);
242
244
250 vtkSetMacro(Text, vtkTypeBool);
251 vtkGetMacro(Text, vtkTypeBool);
252 vtkBooleanMacro(Text, vtkTypeBool);
254
256
260 vtkSetMacro(Landscape, vtkTypeBool);
261 vtkGetMacro(Landscape, vtkTypeBool);
262 vtkBooleanMacro(Landscape, vtkTypeBool);
264
266
271 vtkSetMacro(PS3Shading, vtkTypeBool);
272 vtkGetMacro(PS3Shading, vtkTypeBool);
273 vtkBooleanMacro(PS3Shading, vtkTypeBool);
275
277
284 vtkBooleanMacro(OcclusionCull, vtkTypeBool);
286
288
300
302
307 vtkSetMacro(TextAsPath, bool);
308 vtkGetMacro(TextAsPath, bool);
309 vtkBooleanMacro(TextAsPath, bool);
311
313
322
324
328 vtkSetMacro(PointSizeFactor, float);
329 vtkGetMacro(PointSizeFactor, float);
331
333
337 vtkSetMacro(LineWidthFactor, float);
338 vtkGetMacro(LineWidthFactor, float);
340
341protected:
344
348 const char* GetFileExtension();
349
351
353 char* Title;
356 int Sort;
370
371private:
372 vtkGL2PSExporter(const vtkGL2PSExporter&) = delete;
373 void operator=(const vtkGL2PSExporter&) = delete;
374};
375
376inline const char* vtkGL2PSExporter::GetSortAsString(void)
377{
378 if (this->Sort == NO_SORT)
379 {
380 return "Off";
381 }
382 else if (this->Sort == SIMPLE_SORT)
383 {
384 return "Simple";
385 }
386 else
387 {
388 return "BSP";
389 }
390}
391
393{
394 if (this->FileFormat == PS_FILE)
395 {
396 return "PS";
397 }
398 else if (this->FileFormat == EPS_FILE)
399 {
400 return "EPS";
401 }
402 else if (this->FileFormat == PDF_FILE)
403 {
404 return "PDF";
405 }
406 else if (this->FileFormat == TEX_FILE)
407 {
408 return "TeX";
409 }
410 else
411 {
412 return "SVG";
413 }
414}
415
416#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:34
an ordered list of Props
int vtkTypeBool
Definition vtkABI.h:69