Swiftray  1.0
svgpp-common.h
Go to the documentation of this file.
1 #pragma once
2 
3 // Boost mpl parameters
4 #define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
5 #define BOOST_MPL_LIMIT_SET_SIZE 50
6 #define BOOST_PARAMETER_MAX_ARITY 15
7 // Following defines move parts of SVG++ code to svgpp_parser_impl.cpp file to
8 // boost compilation
9 #define SVGPP_USE_EXTERNAL_PATH_DATA_PARSER
10 #define SVGPP_USE_EXTERNAL_TRANSFORM_PARSER
11 #define SVGPP_USE_EXTERNAL_COLOR_PARSER
12 #define SVGPP_USE_EXTERNAL_PRESERVE_ASPECT_RATIO_PARSER
13 #define SVGPP_USE_EXTERNAL_PAINT_PARSER
14 #define SVGPP_USE_EXTERNAL_MISC_PARSER
15 
16 // Include boost libraries in early stage
17 #include <boost/mpl/set.hpp>
18 #include <boost/mpl/set/set50.hpp>
19 #include <boost/tuple/tuple.hpp>
20 #include <boost/variant.hpp>
21 
22 #include <libxml/parser.h>
23 #include <libxml/tree.h>
25 #include <svgpp/policy/xml/libxml2.hpp>
26 #include <svgpp/svgpp.hpp>
27 
28 #include <string>
29 
30 #include <QList>
31 #include <QString>
32 #include <layer.h>
33 
34 namespace Parser {
35 
36  using namespace svgpp;
37 
38  extern QList<LayerPtr> *svgpp_layers;
39  extern QMap<QString, Layer *> *svgpp_layer_map;
41 
42  bool svgpp_parse(QByteArray &data);
43 
44  void svgpp_add_layer(LayerPtr &layer);
45 
46  void svgpp_add_shape(ShapePtr &shape, QString &layer_name);
47 
48  void svgpp_set_active_layer(LayerPtr &layer);
49 
51 
52 }
shared_ptr< Layer > LayerPtr
Definition: layer.h:127
Definition: base-context.h:8
void svgpp_unset_active_layer()
Definition: svgpp-impl.cpp:250
QMap< QString, Layer * > * svgpp_layer_map
Definition: svgpp-impl.cpp:217
LayerPtr svgpp_active_layer_
Definition: svgpp-impl.cpp:219
void svgpp_add_layer(LayerPtr &layer)
Definition: svgpp-impl.cpp:254
void svgpp_set_active_layer(LayerPtr &layer)
Definition: svgpp-impl.cpp:246
QList< LayerPtr > * svgpp_layers
Definition: svgpp-impl.cpp:216
bool svgpp_parse(QByteArray &data)
Definition: svgpp-impl.cpp:221
void svgpp_add_shape(ShapePtr &shape, QString &layer_name)
Definition: svgpp-impl.cpp:268
shared_ptr< Shape > ShapePtr
Definition: shape.h:137