VTK  9.1.0
vtkSVGExporter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkSVGExporter.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 =========================================================================*/
64 #ifndef vtkSVGExporter_h
65 #define vtkSVGExporter_h
66 
67 #include "vtkExporter.h"
68 #include "vtkIOExportModule.h" // For export macro
69 
70 class vtkContextActor;
71 class vtkRenderer;
73 class vtkXMLDataElement;
74 
75 class VTKIOEXPORT_EXPORT vtkSVGExporter : public vtkExporter
76 {
77 public:
78  static vtkSVGExporter* New();
79  vtkTypeMacro(vtkSVGExporter, vtkExporter);
80  void PrintSelf(ostream& os, vtkIndent indent) override;
81 
83  vtkSetStringMacro(Title);
84  vtkGetStringMacro(Title);
88  vtkSetStringMacro(Description);
89  vtkGetStringMacro(Description);
112  vtkSetMacro(TextAsPath, bool);
113  vtkGetMacro(TextAsPath, bool);
114  vtkBooleanMacro(TextAsPath, bool);
122  vtkSetMacro(DrawBackground, bool);
123  vtkGetMacro(DrawBackground, bool);
124  vtkBooleanMacro(DrawBackground, bool);
142  vtkSetMacro(SubdivisionThreshold, float);
143  vtkGetMacro(SubdivisionThreshold, float);
146 protected:
148  ~vtkSVGExporter() override;
149 
150  void WriteData() override;
151 
152  void WriteSVG();
157 
158  char* Title;
159  char* Description;
160  char* FileName;
161 
166 
170 
171 private:
172  vtkSVGExporter(const vtkSVGExporter&) = delete;
173  void operator=(const vtkSVGExporter&) = delete;
174 };
175 
176 #endif // vtkSVGExporter_h
provides a vtkProp derived object.
abstract class to write a scene to a file
Definition: vtkExporter.h:48
a simple class to control print indentation
Definition: vtkIndent.h:113
abstract specification for renderers
Definition: vtkRenderer.h:173
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.