1 #ifndef __INKSCAPE_EXTENSION_INTERNAL_PRINT_LATEX_H__
2 #define __INKSCAPE_EXTENSION_INTERNAL_PRINT_LATEX_H__
4 /*
5 * LaTeX Printing
6 *
7 * Author:
8 * Michael Forbes <miforbes@mbhs.edu>
9 *
10 * Copyright (C) 2004 Authors
11 *
12 * Released under GNU GPL, read the file 'COPYING' for more information
13 */
15 #include <config.h>
17 #include "extension/implementation/implementation.h"
18 #include "extension/extension.h"
20 #include "svg/stringstream.h"
22 #include <stack>
24 namespace Inkscape {
25 namespace Extension {
26 namespace Internal {
28 class PrintLatex : public Inkscape::Extension::Implementation::Implementation {
30 float _width;
31 float _height;
32 FILE * _stream;
34 std::stack<Geom::Matrix> m_tr_stack;
36 void print_pathvector(SVGOStringStream &os, Geom::PathVector const &pathv_in, const Geom::Matrix * /*transform*/);
37 void print_2geomcurve(SVGOStringStream &os, Geom::Curve const & c );
39 public:
40 PrintLatex (void);
41 virtual ~PrintLatex (void);
43 /* Print functions */
44 virtual unsigned int setup (Inkscape::Extension::Print * module);
46 virtual unsigned int begin (Inkscape::Extension::Print * module, SPDocument *doc);
47 virtual unsigned int finish (Inkscape::Extension::Print * module);
49 /* Rendering methods */
50 virtual unsigned int bind(Inkscape::Extension::Print *module, Geom::Matrix const *transform, float opacity);
51 virtual unsigned int release(Inkscape::Extension::Print *module);
53 virtual unsigned int fill (Inkscape::Extension::Print * module, Geom::PathVector const &pathv, const Geom::Matrix *ctm, const SPStyle *style,
54 const NRRect *pbox, const NRRect *dbox, const NRRect *bbox);
55 virtual unsigned int stroke (Inkscape::Extension::Print * module, Geom::PathVector const &pathv, const Geom::Matrix *transform, const SPStyle *style,
56 const NRRect *pbox, const NRRect *dbox, const NRRect *bbox);
57 virtual unsigned int comment(Inkscape::Extension::Print *module, const char * comment);
58 bool textToPath (Inkscape::Extension::Print * ext);
60 static void init (void);
61 };
63 } /* namespace Internal */
64 } /* namespace Extension */
65 } /* namespace Inkscape */
67 #endif /* __INKSCAPE_EXTENSION_INTERNAL_PRINT_LATEX */
69 /*
70 Local Variables:
71 mode:cpp
72 c-file-style:"stroustrup"
73 c-file-offsets:((innamespace . 0)(inline-open . 0))
74 indent-tabs-mode:nil
75 fill-column:99
76 End:
77 */
78 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :