VTK  9.3.1
vtkPDFExporter.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
16 #ifndef vtkPDFExporter_h
17 #define vtkPDFExporter_h
18 
19 #include "vtkExporter.h"
20 #include "vtkIOExportPDFModule.h" // For export macro
21 
22 VTK_ABI_NAMESPACE_BEGIN
23 class vtkContextActor;
24 class vtkRenderer;
25 
26 class VTKIOEXPORTPDF_EXPORT vtkPDFExporter : public vtkExporter
27 {
28 public:
29  static vtkPDFExporter* New();
30  vtkTypeMacro(vtkPDFExporter, vtkExporter);
31  void PrintSelf(ostream& os, vtkIndent indent) override;
32 
34  vtkSetStringMacro(Title);
35  vtkGetStringMacro(Title);
39  vtkSetFilePathMacro(FileName);
40  vtkGetFilePathMacro(FileName);
43 protected:
45  ~vtkPDFExporter() override;
46 
47  void WriteData() override;
48 
49  void WritePDF();
50  void PrepareDocument();
51  void RenderContextActors();
52  void RenderContextActor(vtkContextActor* actor, vtkRenderer* renderer);
53 
54  char* Title;
55  char* FileName;
56 
57 private:
58  vtkPDFExporter(const vtkPDFExporter&) = delete;
59  void operator=(const vtkPDFExporter&) = delete;
60 
61  struct Details;
62  Details* Impl;
63 };
64 
65 VTK_ABI_NAMESPACE_END
66 #endif // vtkPDFExporter_h
abstract class to write a scene to a file
Definition: vtkExporter.h:36
virtual void WriteData()=0
abstract specification for renderers
Definition: vtkRenderer.h:61
a simple class to control print indentation
Definition: vtkIndent.h:28
provides a vtkProp derived object.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
Exports vtkContext2D scenes to PDF.