Merge commit 'eb15d0bd8a9a748b2381c9e09575a98f3c5861f5' into harfbuzz
This commit is contained in:
commit
2735b47bd3
7 changed files with 26 additions and 23 deletions
|
@ -40,8 +40,6 @@
|
|||
|
||||
namespace mapnik {
|
||||
|
||||
typedef MAPNIK_DECL boost::shared_ptr<Feature> feature_ptr;
|
||||
|
||||
struct MAPNIK_DECL Featureset : private mapnik::noncopyable
|
||||
{
|
||||
virtual feature_ptr next() = 0;
|
||||
|
|
|
@ -313,6 +313,8 @@ inline std::ostream& operator<< (std::ostream & out,feature_impl const& f)
|
|||
|
||||
typedef feature_impl Feature;
|
||||
|
||||
typedef MAPNIK_DECL boost::shared_ptr<Feature> feature_ptr;
|
||||
|
||||
}
|
||||
|
||||
#endif // MAPNIK_FEATURE_HPP
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
// mapnik
|
||||
#include <mapnik/config.hpp>
|
||||
#include <mapnik/feature.hpp>
|
||||
#include <mapnik/datasource.hpp>
|
||||
#include <mapnik/noncopyable.hpp>
|
||||
#include <mapnik/unicode.hpp>
|
||||
|
||||
// boost
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
@ -43,7 +43,7 @@ template <typename Iterator>
|
|||
class feature_collection_parser : private mapnik::noncopyable
|
||||
{
|
||||
typedef Iterator iterator_type;
|
||||
typedef mapnik::Feature feature_type;
|
||||
typedef mapnik::feature_impl feature_type;
|
||||
public:
|
||||
feature_collection_parser(mapnik::context_ptr const& ctx, mapnik::transcoder const& tr);
|
||||
~feature_collection_parser();
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
|
||||
// mapnik
|
||||
#include <mapnik/global.hpp>
|
||||
#include <mapnik/value.hpp>
|
||||
#include <mapnik/feature.hpp>
|
||||
#include <mapnik/json/geometry_generator_grammar.hpp>
|
||||
#include <mapnik/feature_kv_iterator.hpp>
|
||||
|
@ -43,29 +44,29 @@
|
|||
namespace boost { namespace spirit { namespace traits {
|
||||
|
||||
template <>
|
||||
struct is_container<mapnik::Feature const> : mpl::false_ {} ;
|
||||
struct is_container<mapnik::feature_impl const> : mpl::false_ {} ;
|
||||
|
||||
template <>
|
||||
struct container_iterator<mapnik::Feature const>
|
||||
struct container_iterator<mapnik::feature_impl const>
|
||||
{
|
||||
typedef mapnik::feature_kv_iterator2 type;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct begin_container<mapnik::Feature const>
|
||||
struct begin_container<mapnik::feature_impl const>
|
||||
{
|
||||
static mapnik::feature_kv_iterator2
|
||||
call (mapnik::Feature const& f)
|
||||
call (mapnik::feature_impl const& f)
|
||||
{
|
||||
return mapnik::feature_kv_iterator2(mapnik::value_not_null(),f.begin(),f.end());
|
||||
}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct end_container<mapnik::Feature const>
|
||||
struct end_container<mapnik::feature_impl const>
|
||||
{
|
||||
static mapnik::feature_kv_iterator2
|
||||
call (mapnik::Feature const& f)
|
||||
call (mapnik::feature_impl const& f)
|
||||
{
|
||||
return mapnik::feature_kv_iterator2(mapnik::value_not_null(),f.end(),f.end());
|
||||
}
|
||||
|
@ -94,7 +95,7 @@ struct get_id
|
|||
template <typename T>
|
||||
struct result { typedef int type; };
|
||||
|
||||
int operator() (mapnik::Feature const& f) const
|
||||
int operator() (mapnik::feature_impl const& f) const
|
||||
{
|
||||
return f.id();
|
||||
}
|
||||
|
@ -107,7 +108,7 @@ struct make_properties_range
|
|||
template <typename T>
|
||||
struct result { typedef properties_range_type type; };
|
||||
|
||||
properties_range_type operator() (mapnik::Feature const& f) const
|
||||
properties_range_type operator() (mapnik::feature_impl const& f) const
|
||||
{
|
||||
return boost::make_iterator_range(f.begin(),f.end());
|
||||
}
|
||||
|
@ -173,7 +174,7 @@ struct escaped_string
|
|||
|
||||
template <typename OutputIterator>
|
||||
struct feature_generator_grammar:
|
||||
karma::grammar<OutputIterator, mapnik::Feature const&()>
|
||||
karma::grammar<OutputIterator, mapnik::feature_impl const&()>
|
||||
{
|
||||
typedef boost::tuple<std::string, mapnik::value> pair_type;
|
||||
typedef make_properties_range::properties_range_type range_type;
|
||||
|
@ -224,10 +225,10 @@ struct feature_generator_grammar:
|
|||
}
|
||||
|
||||
// rules
|
||||
karma::rule<OutputIterator, mapnik::Feature const&()> feature;
|
||||
karma::rule<OutputIterator, mapnik::feature_impl const&()> feature;
|
||||
multi_geometry_generator_grammar<OutputIterator> geometry;
|
||||
escaped_string<OutputIterator> escaped_string_;
|
||||
karma::rule<OutputIterator, mapnik::Feature const&()> properties;
|
||||
karma::rule<OutputIterator, mapnik::feature_impl const&()> properties;
|
||||
karma::rule<OutputIterator, pair_type()> pair;
|
||||
karma::rule<OutputIterator, void(mapnik::value const&)> value;
|
||||
karma::rule<OutputIterator, mapnik::value_null()> value_null_;
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
|
||||
// mapnik
|
||||
#include <mapnik/json/geometry_grammar.hpp>
|
||||
#include <mapnik/value.hpp>
|
||||
#include <mapnik/feature.hpp>
|
||||
#include <mapnik/unicode.hpp>
|
||||
#include <mapnik/value.hpp>
|
||||
|
|
|
@ -43,7 +43,7 @@ class MAPNIK_DECL feature_generator : private mapnik::noncopyable
|
|||
public:
|
||||
feature_generator();
|
||||
~feature_generator();
|
||||
bool generate(std::string & geojson, mapnik::Feature const& f);
|
||||
bool generate(std::string & geojson, mapnik::feature_impl const& f);
|
||||
private:
|
||||
boost::scoped_ptr<feature_generator_grammar<sink_type> > grammar_;
|
||||
};
|
||||
|
@ -66,7 +66,7 @@ class MAPNIK_DECL feature_generator : private mapnik::noncopyable
|
|||
public:
|
||||
feature_generator() {}
|
||||
~feature_generator() {}
|
||||
bool generate(std::string & geojson, mapnik::Feature const& f);
|
||||
bool generate(std::string & geojson, mapnik::feature_impl const& f);
|
||||
};
|
||||
|
||||
class MAPNIK_DECL geometry_generator : private mapnik::noncopyable
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#define MAPNIK_MARKER_HELPERS_HPP
|
||||
|
||||
#include <mapnik/color.hpp>
|
||||
#include <mapnik/feature.hpp>
|
||||
#include <mapnik/geometry.hpp>
|
||||
#include <mapnik/geom_util.hpp>
|
||||
#include <mapnik/markers_symbolizer.hpp>
|
||||
|
@ -303,17 +304,17 @@ void build_ellipse(T const& sym, mapnik::feature_impl const& feature, svg_storag
|
|||
double height = 0;
|
||||
if (width_expr && height_expr)
|
||||
{
|
||||
width = boost::apply_visitor(evaluate<Feature,value_type>(feature), *width_expr).to_double();
|
||||
height = boost::apply_visitor(evaluate<Feature,value_type>(feature), *height_expr).to_double();
|
||||
width = boost::apply_visitor(evaluate<feature_impl,value_type>(feature), *width_expr).to_double();
|
||||
height = boost::apply_visitor(evaluate<feature_impl,value_type>(feature), *height_expr).to_double();
|
||||
}
|
||||
else if (width_expr)
|
||||
{
|
||||
width = boost::apply_visitor(evaluate<Feature,value_type>(feature), *width_expr).to_double();
|
||||
width = boost::apply_visitor(evaluate<feature_impl,value_type>(feature), *width_expr).to_double();
|
||||
height = width;
|
||||
}
|
||||
else if (height_expr)
|
||||
{
|
||||
height = boost::apply_visitor(evaluate<Feature,value_type>(feature), *height_expr).to_double();
|
||||
height = boost::apply_visitor(evaluate<feature_impl,value_type>(feature), *height_expr).to_double();
|
||||
width = height;
|
||||
}
|
||||
svg::svg_converter_type styled_svg(svg_path, marker_ellipse.attributes());
|
||||
|
@ -386,11 +387,11 @@ void setup_transform_scaling(agg::trans_affine & tr, box2d<double> const& bbox,
|
|||
|
||||
expression_ptr const& width_expr = sym.get_width();
|
||||
if (width_expr)
|
||||
width = boost::apply_visitor(evaluate<Feature,value_type>(feature), *width_expr).to_double();
|
||||
width = boost::apply_visitor(evaluate<feature_impl,value_type>(feature), *width_expr).to_double();
|
||||
|
||||
expression_ptr const& height_expr = sym.get_height();
|
||||
if (height_expr)
|
||||
height = boost::apply_visitor(evaluate<Feature,value_type>(feature), *height_expr).to_double();
|
||||
height = boost::apply_visitor(evaluate<feature_impl,value_type>(feature), *height_expr).to_double();
|
||||
|
||||
if (width > 0 && height > 0)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue