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 =========================================================================*/
45 #ifndef vtkSVGExporter_h
46 #define vtkSVGExporter_h
47 
48 #include "vtkExporter.h"
49 #include "vtkIOExportModule.h" // For export macro
50 
51 class vtkContextActor;
52 class vtkRenderer;
54 class vtkXMLDataElement;
55 
56 class VTKIOEXPORT_EXPORT vtkSVGExporter : public vtkExporter
57 {
58 public:
59  static vtkSVGExporter* New();
60  vtkTypeMacro(vtkSVGExporter, vtkExporter);
61  void PrintSelf(ostream& os, vtkIndent indent) override;
62 
64  vtkSetStringMacro(Title);
65  vtkGetStringMacro(Title);
69  vtkSetStringMacro(Description);
70  vtkGetStringMacro(Description);
93  vtkSetMacro(TextAsPath, bool);
94  vtkGetMacro(TextAsPath, bool);
95  vtkBooleanMacro(TextAsPath, bool);
103  vtkSetMacro(DrawBackground, bool);
104  vtkGetMacro(DrawBackground, bool);
105  vtkBooleanMacro(DrawBackground, bool);
123  vtkSetMacro(SubdivisionThreshold, float);
124  vtkGetMacro(SubdivisionThreshold, float);
127 protected:
129  ~vtkSVGExporter() override;
130 
131  void WriteData() override;
132 
133  void WriteSVG();
138 
139  char* Title;
140  char* Description;
141  char* FileName;
142 
147 
151 
152 private:
153  vtkSVGExporter(const vtkSVGExporter&) = delete;
154  void operator=(const vtkSVGExporter&) = delete;
155 };
156 
157 #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:34
abstract specification for renderers
Definition: vtkRenderer.h:73
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.