VTK  9.4.20241218
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
42VTK_ABI_NAMESPACE_BEGIN
43class vtkContextActor;
44class vtkRenderer;
47
48class VTKIOEXPORT_EXPORT vtkSVGExporter : public vtkExporter
49{
50public:
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);
119protected:
121 ~vtkSVGExporter() override;
122
123 void WriteData() override;
124
125 void WriteSVG();
130
131 char* Title;
133 char* FileName;
134
139
143
144private:
145 vtkSVGExporter(const vtkSVGExporter&) = delete;
146 void operator=(const vtkSVGExporter&) = delete;
147};
148
149VTK_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
vtkContextDevice2D implementation for use with vtkSVGExporter.
Exports vtkContext2D scenes to SVG.
vtkGetFilePathMacro(FileName)
The name of the exported file.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkXMLDataElement * RootNode
vtkXMLDataElement * DefinitionNode
static vtkSVGExporter * New()
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.