VTK
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 =========================================================================*/
42 #ifndef vtkSVGExporter_h
43 #define vtkSVGExporter_h
44 
45 #include "vtkIOExportModule.h" // For export macro
46 #include "vtkExporter.h"
47 
48 class vtkContextActor;
49 class vtkRenderer;
51 class vtkXMLDataElement;
52 
53 class VTKIOEXPORT_EXPORT vtkSVGExporter: public vtkExporter
54 {
55 public:
56  static vtkSVGExporter* New();
57  vtkTypeMacro(vtkSVGExporter, vtkExporter)
58  void PrintSelf(ostream &os, vtkIndent indent) override;
59 
61  vtkSetStringMacro(Title)
62  vtkGetStringMacro(Title)
66  vtkSetStringMacro(Description)
67  vtkGetStringMacro(Description)
71  vtkSetStringMacro(FileName)
72  vtkGetStringMacro(FileName)
90  vtkSetMacro(TextAsPath, bool)
91  vtkGetMacro(TextAsPath, bool)
92  vtkBooleanMacro(TextAsPath, bool)
100  vtkSetMacro(DrawBackground, bool)
101  vtkGetMacro(DrawBackground, bool)
102  vtkBooleanMacro(DrawBackground, bool)
120  vtkSetMacro(SubdivisionThreshold, float)
121  vtkGetMacro(SubdivisionThreshold, float)
124 protected:
125  vtkSVGExporter();
126  ~vtkSVGExporter() override;
127 
128  void WriteData() override;
129 
130  void WriteSVG();
131  void PrepareDocument();
132  void RenderContextActors();
133  void RenderBackground(vtkRenderer *ren);
134  void RenderContextActor(vtkContextActor *actor,
135  vtkRenderer *renderer);
136 
137  char *Title;
138  char *Description;
139  char *FileName;
140 
145 
149 
150 private:
151  vtkSVGExporter(const vtkSVGExporter&) = delete;
152  void operator=(const vtkSVGExporter&) = delete;
153 };
154 
155 #endif // vtkSVGExporter_h
abstract class to write a scene to a file
Definition: vtkExporter.h:46
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:63
float SubdivisionThreshold
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkXMLDataElement * DefinitionNode
vtkXMLDataElement * RootNode
provides a vtkProp derived object.
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkSVGContextDevice2D * Device
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
Exports vtkContext2D scenes to SVG.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...