20
20
#include "extension/implementation/implementation.h"
32
* Output bezier splines in POVRay format.
34
* For information, @see:
35
* http://www.povray.org
26
37
class PovOutput : public Inkscape::Extension::Implementation::Implementation
42
* Our internal String definition
44
typedef Glib::ustring String;
50
* Check whether we can actually output using this module
52
bool check (Inkscape::Extension::Extension * module);
55
* API call to perform the output to a file
57
void save (Inkscape::Extension::Output *mod,
58
SPDocument *doc, const gchar *uri);
61
* Inkscape runtime startup call.
63
static void init(void);
66
* Reset variables to initial state
73
* Format text to our output buffer
75
void out(char const *fmt, ...) G_GNUC_PRINTF(2,3);
80
void vec2(double a, double b);
85
void vec3(double a, double b, double c);
90
void vec4(double a, double b, double c, double d);
93
* Output an rgbf color vector
95
void rgbf(double r, double g, double b, double f);
98
* Output one bezier's start, start-control,
99
* end-control, and end nodes
101
void segment(int segNr, double a0, double a1,
102
double b0, double b1,
103
double c0, double c1,
104
double d0, double d1);
108
* Output the file header
113
* Output the file footer
118
* Output the SVG document's curve data as POV curves
120
void doCurves(SPDocument *doc);
123
* Actual method to save document
125
void saveDocument(SPDocument *doc, const gchar *uri);
129
* used for saving information about shapes
31
bool check (Inkscape::Extension::Extension * module);
33
void save (Inkscape::Extension::Output *mod,
37
static void init (void);
136
PovShapeInfo(const PovShapeInfo &other)
138
PovShapeInfo operator=(const PovShapeInfo &other)
139
{ assign(other); return *this; }
140
virtual ~PovShapeInfo()
146
void assign(const PovShapeInfo &other)
153
//A list for saving information about the shapes
154
std::vector<PovShapeInfo> povShapes;
156
//For formatted output
45
} //namespace Internal
46
} //namespace Extension
47
} //namespace Inkscape
169
} // namespace Internal
170
} // namespace Extension
171
} // namespace Inkscape