start disabling svg_renderer features to get closer to compiling - refs #1438
This commit is contained in:
parent
0ccf9254ec
commit
2cf429db08
18 changed files with 63 additions and 53 deletions
|
@ -27,8 +27,8 @@
|
|||
#include <mapnik/ctrans.hpp>
|
||||
#include <mapnik/color.hpp>
|
||||
#include <mapnik/geometry.hpp>
|
||||
#include <mapnik/svg/svg_output_grammars.hpp>
|
||||
#include <mapnik/svg/svg_output_attributes.hpp>
|
||||
#include <mapnik/svg/output/svg_output_grammars.hpp>
|
||||
#include <mapnik/svg/output/svg_output_attributes.hpp>
|
||||
|
||||
// boost
|
||||
#include <boost/utility.hpp>
|
||||
|
@ -48,7 +48,7 @@ namespace mapnik { namespace svg {
|
|||
|
||||
typedef svg::svg_root_attributes_grammar<OutputIterator> root_attributes_grammar;
|
||||
typedef svg::svg_rect_attributes_grammar<OutputIterator> rect_attributes_grammar;
|
||||
typedef svg::svg_path_data_grammar<OutputIterator, path_type> path_data_grammar;
|
||||
//typedef svg::svg_path_data_grammar<OutputIterator, path_type> path_data_grammar;
|
||||
typedef svg::svg_path_attributes_grammar<OutputIterator> path_attributes_grammar;
|
||||
typedef svg::svg_path_dash_array_grammar<OutputIterator> path_dash_array_grammar;
|
||||
|
||||
|
@ -60,7 +60,7 @@ namespace mapnik { namespace svg {
|
|||
void generate_opening_root(root_output_attributes const& root_attributes);
|
||||
void generate_closing_root();
|
||||
void generate_rect(rect_output_attributes const& rect_attributes);
|
||||
void generate_path(path_type const& path, path_output_attributes const& path_attributes);
|
||||
//void generate_path(path_type const& path, path_output_attributes const& path_attributes);
|
||||
|
||||
private:
|
||||
OutputIterator& output_iterator_;
|
||||
|
|
|
@ -92,6 +92,7 @@ BOOST_FUSION_ADAPT_STRUCT(
|
|||
* required by Karma to be recognized as a container of
|
||||
* attributes for output generation.
|
||||
*/
|
||||
/*
|
||||
namespace boost { namespace spirit { namespace traits {
|
||||
|
||||
typedef mapnik::coord_transform<mapnik::CoordTransform, mapnik::geometry_type> path_type;
|
||||
|
@ -126,12 +127,14 @@ namespace boost { namespace spirit { namespace traits {
|
|||
}
|
||||
};
|
||||
}}}
|
||||
*/
|
||||
|
||||
namespace mapnik { namespace svg {
|
||||
|
||||
using namespace boost::spirit;
|
||||
using namespace boost::phoenix;
|
||||
|
||||
/*
|
||||
template <typename OutputIterator, typename PathType>
|
||||
struct svg_path_data_grammar : karma::grammar<OutputIterator, PathType&()>
|
||||
{
|
||||
|
@ -165,6 +168,7 @@ namespace mapnik { namespace svg {
|
|||
|
||||
PathType const& path_type_;
|
||||
};
|
||||
*/
|
||||
|
||||
template <typename OutputIterator>
|
||||
struct svg_path_attributes_grammar : karma::grammar<OutputIterator, mapnik::svg::path_output_attributes()>
|
||||
|
|
|
@ -62,7 +62,7 @@ class path_iterator
|
|||
public:
|
||||
typedef Value value_type;
|
||||
typedef Container container_type;
|
||||
typedef typename Container::value_type value_component_type;
|
||||
//typedef typename Container::value_type value_component_type;
|
||||
|
||||
/*!
|
||||
* @brief Constructor that initializes the reference to the current element to null.
|
||||
|
@ -119,8 +119,8 @@ private:
|
|||
void increment()
|
||||
{
|
||||
// variables used to extract vertex components.
|
||||
geometry_type::value_type x;
|
||||
geometry_type::value_type y;
|
||||
geometry_type::coord_type x;
|
||||
geometry_type::coord_type y;
|
||||
|
||||
// extract next vertex components.
|
||||
unsigned cmd = path_.vertex(&x, &y);
|
||||
|
@ -173,8 +173,8 @@ private:
|
|||
* The Value type is a boost::tuple that holds 5 elements, the command and the x and y coordinate.
|
||||
* Each coordinate is stored twice to match the needs of the grammar.
|
||||
*/
|
||||
typedef path_iterator<boost::tuple<unsigned, geometry_type::value_type, geometry_type::value_type>,
|
||||
coord_transform<CoordTransform, geometry_type> > path_iterator_type;
|
||||
//typedef path_iterator<boost::tuple<unsigned, geometry_type::coord_type, geometry_type::value_type>,
|
||||
// coord_transform<CoordTransform, geometry_type> > path_iterator_type;
|
||||
|
||||
}}
|
||||
|
||||
|
|
|
@ -42,54 +42,60 @@ class MAPNIK_DECL svg_renderer : public feature_style_processor<svg_renderer<Out
|
|||
private boost::noncopyable
|
||||
{
|
||||
public:
|
||||
typedef svg_renderer<OutputIterator> processor_impl_type;
|
||||
svg_renderer(Map const& m, OutputIterator& output_iterator, unsigned offset_x=0, unsigned offset_y=0);
|
||||
~svg_renderer();
|
||||
|
||||
void start_map_processing(Map const& map);
|
||||
void end_map_processing(Map const& map);
|
||||
void start_layer_processing(layer const& lay);
|
||||
void start_layer_processing(layer const& lay, box2d<double> const& query_extent);
|
||||
void end_layer_processing(layer const& lay);
|
||||
void start_style_processing(feature_type_style const& st) {}
|
||||
void end_style_processing(feature_type_style const& st) {}
|
||||
|
||||
/*!
|
||||
* @brief Overloads that process each kind of symbolizer individually.
|
||||
*/
|
||||
void process(point_symbolizer const& sym,
|
||||
Feature const& feature,
|
||||
mapnik::feature_impl & feature,
|
||||
proj_transform const& prj_trans);
|
||||
void process(line_symbolizer const& sym,
|
||||
Feature const& feature,
|
||||
mapnik::feature_impl & feature,
|
||||
proj_transform const& prj_trans);
|
||||
void process(line_pattern_symbolizer const& sym,
|
||||
Feature const& feature,
|
||||
mapnik::feature_impl & feature,
|
||||
proj_transform const& prj_trans);
|
||||
void process(polygon_symbolizer const& sym,
|
||||
Feature const& feature,
|
||||
mapnik::feature_impl & feature,
|
||||
proj_transform const& prj_trans);
|
||||
void process(polygon_pattern_symbolizer const& sym,
|
||||
Feature const& feature,
|
||||
mapnik::feature_impl & feature,
|
||||
proj_transform const& prj_trans);
|
||||
void process(raster_symbolizer const& sym,
|
||||
Feature const& feature,
|
||||
mapnik::feature_impl & feature,
|
||||
proj_transform const& prj_trans);
|
||||
void process(shield_symbolizer const& sym,
|
||||
Feature const& feature,
|
||||
mapnik::feature_impl & feature,
|
||||
proj_transform const& prj_trans);
|
||||
void process(text_symbolizer const& sym,
|
||||
Feature const& feature,
|
||||
mapnik::feature_impl & feature,
|
||||
proj_transform const& prj_trans);
|
||||
void process(building_symbolizer const& sym,
|
||||
Feature const& feature,
|
||||
mapnik::feature_impl & feature,
|
||||
proj_transform const& prj_trans);
|
||||
void process(markers_symbolizer const& sym,
|
||||
Feature const& feature,
|
||||
mapnik::feature_impl & feature,
|
||||
proj_transform const& prj_trans);
|
||||
void process(debug_symbolizer const& sym,
|
||||
mapnik::feature_impl & feature,
|
||||
proj_transform const& prj_trans) {}
|
||||
|
||||
/*!
|
||||
* @brief Overload that process the whole set of symbolizers of a rule.
|
||||
* @return true, meaning that this renderer can process multiple symbolizers.
|
||||
*/
|
||||
bool process(rule::symbolizers const& syms,
|
||||
Feature const& feature,
|
||||
mapnik::feature_impl & feature,
|
||||
proj_transform const& prj_trans);
|
||||
|
||||
void painted(bool painted)
|
||||
|
@ -114,6 +120,7 @@ private:
|
|||
CoordTransform t_;
|
||||
svg::svg_generator<OutputIterator> generator_;
|
||||
svg::path_output_attributes path_attributes_;
|
||||
box2d<double> query_extent_;
|
||||
bool painted_;
|
||||
|
||||
/*!
|
||||
|
@ -125,7 +132,7 @@ private:
|
|||
struct symbol_dispatch : public boost::static_visitor<>
|
||||
{
|
||||
symbol_dispatch(svg_renderer<OutputIterator>& processor,
|
||||
Feature const& feature,
|
||||
mapnik::feature_impl & feature,
|
||||
proj_transform const& prj_trans)
|
||||
: processor_(processor),
|
||||
feature_(feature),
|
||||
|
@ -138,7 +145,7 @@ private:
|
|||
}
|
||||
|
||||
svg_renderer<OutputIterator>& processor_;
|
||||
Feature const& feature_;
|
||||
mapnik::feature_impl & feature_;
|
||||
proj_transform const& prj_trans_;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -27,13 +27,13 @@ namespace mapnik
|
|||
{
|
||||
template <typename T>
|
||||
void svg_renderer<T>::process(building_symbolizer const& sym,
|
||||
Feature const& feature,
|
||||
mapnik::feature_impl & feature,
|
||||
proj_transform const& prj_trans)
|
||||
{
|
||||
// nothing yet.
|
||||
}
|
||||
|
||||
template void svg_renderer<std::ostream_iterator<char> >::process(building_symbolizer const& sym,
|
||||
Feature const& feature,
|
||||
mapnik::feature_impl & feature,
|
||||
proj_transform const& prj_trans);
|
||||
}
|
||||
|
|
|
@ -27,13 +27,13 @@ namespace mapnik
|
|||
{
|
||||
template <typename T>
|
||||
void svg_renderer<T>::process(line_pattern_symbolizer const& sym,
|
||||
Feature const& feature,
|
||||
mapnik::feature_impl & feature,
|
||||
proj_transform const& prj_trans)
|
||||
{
|
||||
// nothing yet.
|
||||
}
|
||||
|
||||
template void svg_renderer<std::ostream_iterator<char> >::process(line_pattern_symbolizer const& sym,
|
||||
Feature const& feature,
|
||||
mapnik::feature_impl & feature,
|
||||
proj_transform const& prj_trans);
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ namespace mapnik
|
|||
*/
|
||||
template <typename T>
|
||||
void svg_renderer<T>::process(line_symbolizer const& sym,
|
||||
Feature const& feature,
|
||||
mapnik::feature_impl & feature,
|
||||
proj_transform const& prj_trans)
|
||||
{
|
||||
path_attributes_.set_stroke_color(sym.get_stroke().get_color());
|
||||
|
@ -43,6 +43,6 @@ void svg_renderer<T>::process(line_symbolizer const& sym,
|
|||
}
|
||||
|
||||
template void svg_renderer<std::ostream_iterator<char> >::process(line_symbolizer const& sym,
|
||||
Feature const& feature,
|
||||
mapnik::feature_impl & feature,
|
||||
proj_transform const& prj_trans);
|
||||
}
|
||||
|
|
|
@ -27,13 +27,13 @@ namespace mapnik
|
|||
{
|
||||
template <typename T>
|
||||
void svg_renderer<T>::process(markers_symbolizer const& sym,
|
||||
Feature const& feature,
|
||||
mapnik::feature_impl & feature,
|
||||
proj_transform const& prj_trans)
|
||||
{
|
||||
// nothing yet.
|
||||
}
|
||||
|
||||
template void svg_renderer<std::ostream_iterator<char> >::process(markers_symbolizer const& sym,
|
||||
Feature const& feature,
|
||||
mapnik::feature_impl & feature,
|
||||
proj_transform const& prj_trans);
|
||||
}
|
||||
|
|
|
@ -27,13 +27,13 @@ namespace mapnik
|
|||
{
|
||||
template <typename T>
|
||||
void svg_renderer<T>::process(point_symbolizer const& sym,
|
||||
Feature const& feature,
|
||||
mapnik::feature_impl & feature,
|
||||
proj_transform const& prj_trans)
|
||||
{
|
||||
// nothing yet.
|
||||
}
|
||||
|
||||
template void svg_renderer<std::ostream_iterator<char> >::process(point_symbolizer const& sym,
|
||||
Feature const& feature,
|
||||
mapnik::feature_impl & feature,
|
||||
proj_transform const& prj_trans);
|
||||
}
|
||||
|
|
|
@ -27,13 +27,13 @@ namespace mapnik
|
|||
{
|
||||
template <typename T>
|
||||
void svg_renderer<T>::process(polygon_pattern_symbolizer const& sym,
|
||||
Feature const& feature,
|
||||
mapnik::feature_impl & feature,
|
||||
proj_transform const& prj_trans)
|
||||
{
|
||||
// nothing yet.
|
||||
}
|
||||
|
||||
template void svg_renderer<std::ostream_iterator<char> >::process(polygon_pattern_symbolizer const& sym,
|
||||
Feature const& feature,
|
||||
mapnik::feature_impl & feature,
|
||||
proj_transform const& prj_trans);
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ namespace mapnik
|
|||
*/
|
||||
template <typename T>
|
||||
void svg_renderer<T>::process(polygon_symbolizer const& sym,
|
||||
Feature const& feature,
|
||||
mapnik::feature_impl & feature,
|
||||
proj_transform const& prj_trans)
|
||||
{
|
||||
path_attributes_.set_fill_color(sym.get_fill());
|
||||
|
@ -38,6 +38,6 @@ void svg_renderer<T>::process(polygon_symbolizer const& sym,
|
|||
}
|
||||
|
||||
template void svg_renderer<std::ostream_iterator<char> >::process(polygon_symbolizer const& sym,
|
||||
Feature const& feature,
|
||||
mapnik::feature_impl & feature,
|
||||
proj_transform const& prj_trans);
|
||||
}
|
||||
|
|
|
@ -27,13 +27,13 @@ namespace mapnik
|
|||
{
|
||||
template <typename T>
|
||||
void svg_renderer<T>::process(raster_symbolizer const& sym,
|
||||
Feature const& feature,
|
||||
mapnik::feature_impl & feature,
|
||||
proj_transform const& prj_trans)
|
||||
{
|
||||
// nothing yet.
|
||||
}
|
||||
|
||||
template void svg_renderer<std::ostream_iterator<char> >::process(raster_symbolizer const& sym,
|
||||
Feature const& feature,
|
||||
mapnik::feature_impl & feature,
|
||||
proj_transform const& prj_trans);
|
||||
}
|
||||
|
|
|
@ -27,13 +27,13 @@ namespace mapnik
|
|||
{
|
||||
template <typename T>
|
||||
void svg_renderer<T>::process(shield_symbolizer const& sym,
|
||||
Feature const& feature,
|
||||
mapnik::feature_impl & feature,
|
||||
proj_transform const& prj_trans)
|
||||
{
|
||||
// nothing yet.
|
||||
}
|
||||
|
||||
template void svg_renderer<std::ostream_iterator<char> >::process(shield_symbolizer const& sym,
|
||||
Feature const& feature,
|
||||
mapnik::feature_impl & feature,
|
||||
proj_transform const& prj_trans);
|
||||
}
|
||||
|
|
|
@ -27,11 +27,10 @@ namespace mapnik {
|
|||
|
||||
template <typename OutputIterator>
|
||||
bool svg_renderer<OutputIterator>::process(rule::symbolizers const& syms,
|
||||
Feature const& feature,
|
||||
mapnik::feature_impl & feature,
|
||||
proj_transform const& prj_trans)
|
||||
{
|
||||
// svg renderer supports processing of multiple symbolizers.
|
||||
|
||||
typedef coord_transform<CoordTransform, geometry_type> path_type;
|
||||
|
||||
// process each symbolizer to collect its (path) information.
|
||||
|
@ -48,8 +47,8 @@ bool svg_renderer<OutputIterator>::process(rule::symbolizers const& syms,
|
|||
geometry_type const& geom = feature.get_geometry(i);
|
||||
if(geom.size() > 1)
|
||||
{
|
||||
path_type path(t_, geom, prj_trans);
|
||||
generator_.generate_path(path, path_attributes_);
|
||||
//path_type path(t_, geom, prj_trans);
|
||||
//generator_.generate_path(path, path_attributes_);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -61,7 +60,7 @@ bool svg_renderer<OutputIterator>::process(rule::symbolizers const& syms,
|
|||
};
|
||||
|
||||
template bool svg_renderer<std::ostream_iterator<char> >::process(rule::symbolizers const& syms,
|
||||
Feature const& feature,
|
||||
mapnik::feature_impl & feature,
|
||||
proj_transform const& prj_trans);
|
||||
|
||||
}
|
||||
|
|
|
@ -27,13 +27,13 @@ namespace mapnik
|
|||
{
|
||||
template <typename T>
|
||||
void svg_renderer<T>::process(text_symbolizer const& sym,
|
||||
Feature const& feature,
|
||||
mapnik::feature_impl & feature,
|
||||
proj_transform const& prj_trans)
|
||||
{
|
||||
// nothing yet.
|
||||
}
|
||||
|
||||
template void svg_renderer<std::ostream_iterator<char> >::process(text_symbolizer const& sym,
|
||||
Feature const& feature,
|
||||
mapnik::feature_impl & feature,
|
||||
proj_transform const& prj_trans);
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ namespace mapnik { namespace svg {
|
|||
karma::generate(output_iterator_, lit("<rect ") << attributes_grammar << lit("/>\n"), rect_attributes);
|
||||
}
|
||||
|
||||
template <typename OutputIterator>
|
||||
/*template <typename OutputIterator>
|
||||
void svg_generator<OutputIterator>::generate_path(path_type const& path, path_output_attributes const& path_attributes)
|
||||
{
|
||||
path_data_grammar data_grammar(path);
|
||||
|
@ -75,7 +75,7 @@ namespace mapnik { namespace svg {
|
|||
karma::generate(output_iterator_, lit("<path ") << data_grammar, path);
|
||||
karma::generate(output_iterator_, lit(" ") << dash_array_grammar, path_attributes.stroke_dasharray());
|
||||
karma::generate(output_iterator_, lit(" ") << attributes_grammar << lit("/>\n"), path_attributes);
|
||||
}
|
||||
}*/
|
||||
|
||||
template class svg_generator<std::ostream_iterator<char> >;
|
||||
}}
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
// mapnik
|
||||
#include <mapnik/svg/svg_output_attributes.hpp>
|
||||
#include <mapnik/svg/output/svg_output_attributes.hpp>
|
||||
|
||||
namespace mapnik { namespace svg {
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ void svg_renderer<T>::end_map_processing(Map const& map)
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
void svg_renderer<T>::start_layer_processing(layer const& lay)
|
||||
void svg_renderer<T>::start_layer_processing(layer const& lay, box2d<double> const& query_extent)
|
||||
{
|
||||
MAPNIK_LOG_DEBUG(svg_renderer) << "svg_renderer: Start layer processing=" << lay.name();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue