VTK  9.2.6
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 =========================================================================*/
48 #ifndef vtkSVGExporter_h
49 #define vtkSVGExporter_h
50 
51 #include "vtkExporter.h"
52 #include "vtkIOExportModule.h" // For export macro
53 
54 class vtkContextActor;
55 class vtkRenderer;
57 class vtkXMLDataElement;
58 
59 class VTKIOEXPORT_EXPORT vtkSVGExporter : public vtkExporter
60 {
61 public:
62  static vtkSVGExporter* New();
63  vtkTypeMacro(vtkSVGExporter, vtkExporter);
64  void PrintSelf(ostream& os, vtkIndent indent) override;
65 
67  vtkSetStringMacro(Title);
68  vtkGetStringMacro(Title);
72  vtkSetStringMacro(Description);
73  vtkGetStringMacro(Description);
77  vtkSetFilePathMacro(FileName);
78  vtkGetFilePathMacro(FileName);
96  vtkSetMacro(TextAsPath, bool);
97  vtkGetMacro(TextAsPath, bool);
98  vtkBooleanMacro(TextAsPath, bool);
106  vtkSetMacro(DrawBackground, bool);
107  vtkGetMacro(DrawBackground, bool);
108  vtkBooleanMacro(DrawBackground, bool);
126  vtkSetMacro(SubdivisionThreshold, float);
127  vtkGetMacro(SubdivisionThreshold, float);
130 protected:
131  vtkSVGExporter();
132  ~vtkSVGExporter() override;
133 
134  void WriteData() override;
135 
136  void WriteSVG();
137  void PrepareDocument();
138  void RenderContextActors();
139  void RenderBackground(vtkRenderer* ren);
140  void RenderContextActor(vtkContextActor* actor, vtkRenderer* renderer);
141 
142  char* Title;
143  char* Description;
144  char* FileName;
145 
150 
154 
155 private:
156  vtkSVGExporter(const vtkSVGExporter&) = delete;
157  void operator=(const vtkSVGExporter&) = delete;
158 };
159 
160 #endif // vtkSVGExporter_h
abstract class to write a scene to a file
Definition: vtkExporter.h:47
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:72
float SubdivisionThreshold
a simple class to control print indentation
Definition: vtkIndent.h:39
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...