VTK  9.3.1
vtkSVGExporter.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
36 #ifndef vtkSVGExporter_h
37 #define vtkSVGExporter_h
38 
39 #include "vtkExporter.h"
40 #include "vtkIOExportModule.h" // For export macro
41 
42 VTK_ABI_NAMESPACE_BEGIN
43 class vtkContextActor;
44 class vtkRenderer;
46 class vtkXMLDataElement;
47 
48 class VTKIOEXPORT_EXPORT vtkSVGExporter : public vtkExporter
49 {
50 public:
51  static vtkSVGExporter* New();
52  vtkTypeMacro(vtkSVGExporter, vtkExporter);
53  void PrintSelf(ostream& os, vtkIndent indent) override;
54 
56  vtkSetStringMacro(Title);
57  vtkGetStringMacro(Title);
61  vtkSetStringMacro(Description);
62  vtkGetStringMacro(Description);
66  vtkSetFilePathMacro(FileName);
67  vtkGetFilePathMacro(FileName);
85  vtkSetMacro(TextAsPath, bool);
86  vtkGetMacro(TextAsPath, bool);
87  vtkBooleanMacro(TextAsPath, bool);
95  vtkSetMacro(DrawBackground, bool);
96  vtkGetMacro(DrawBackground, bool);
97  vtkBooleanMacro(DrawBackground, bool);
115  vtkSetMacro(SubdivisionThreshold, float);
116  vtkGetMacro(SubdivisionThreshold, float);
119 protected:
120  vtkSVGExporter();
121  ~vtkSVGExporter() override;
122 
123  void WriteData() override;
124 
125  void WriteSVG();
126  void PrepareDocument();
127  void RenderContextActors();
128  void RenderBackground(vtkRenderer* ren);
129  void RenderContextActor(vtkContextActor* actor, vtkRenderer* renderer);
130 
131  char* Title;
132  char* Description;
133  char* FileName;
134 
139 
143 
144 private:
145  vtkSVGExporter(const vtkSVGExporter&) = delete;
146  void operator=(const vtkSVGExporter&) = delete;
147 };
148 
149 VTK_ABI_NAMESPACE_END
150 #endif // vtkSVGExporter_h
abstract class to write a scene to a file
Definition: vtkExporter.h:36
vtkXMLDataElement * PageNode
virtual void WriteData()=0
Represents an XML element and those nested inside.
vtkContextDevice2D implementation for use with vtkSVGExporter.
abstract specification for renderers
Definition: vtkRenderer.h:61
float SubdivisionThreshold
a simple class to control print indentation
Definition: vtkIndent.h:28
vtkXMLDataElement * DefinitionNode
vtkXMLDataElement * RootNode
provides a vtkProp derived object.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkSVGContextDevice2D * Device
Exports vtkContext2D scenes to SVG.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...