VTK  9.3.20240329
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);
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:
121  ~vtkSVGExporter() override;
122 
123  void WriteData() override;
124 
125  void WriteSVG();
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
provides a vtkProp derived object.
abstract class to write a scene to a file
Definition: vtkExporter.h:37
a simple class to control print indentation
Definition: vtkIndent.h:108
abstract specification for renderers
Definition: vtkRenderer.h:172
vtkContextDevice2D implementation for use with vtkSVGExporter.
Exports vtkContext2D scenes to SVG.
vtkGetFilePathMacro(FileName)
The name of the exported file.
static vtkSVGExporter * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkXMLDataElement * RootNode
vtkXMLDataElement * DefinitionNode
float SubdivisionThreshold
void PrepareDocument()
vtkSVGContextDevice2D * Device
void RenderContextActors()
void RenderBackground(vtkRenderer *ren)
vtkSetFilePathMacro(FileName)
The name of the exported file.
void WriteData() override
vtkXMLDataElement * PageNode
void RenderContextActor(vtkContextActor *actor, vtkRenderer *renderer)
~vtkSVGExporter() override
Represents an XML element and those nested inside.