Merge branch 'master' of github.com:mapnik/mapnik

Conflicts:
	src/symbolizer_helpers.cpp
This commit is contained in:
Hermann Kraus 2012-02-28 01:48:26 +01:00
commit df4eae2f71
4 changed files with 14 additions and 7 deletions

View File

@ -366,7 +366,6 @@ pixel_position shield_symbolizer_helper<FaceManagerT, DetectorT>::get_marker_pos
marker_ext_.re_center(lx, ly);
//label is added to detector by get_line_placement(), but marker isn't
detector_.insert(marker_ext_);
if (writer_.first) writer_.first->add_box(marker_ext_, feature_, t_, writer_.second);
return pixel_position(px, py);
} else {

View File

@ -19,7 +19,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*****************************************************************************/
#include <mapnik/text_placements/dummy.hpp>
#include <boost/make_shared.hpp>
namespace mapnik
{
bool text_placement_info_dummy::next()
@ -32,7 +35,7 @@ bool text_placement_info_dummy::next()
text_placement_info_ptr text_placements_dummy::get_placement_info(
double scale_factor, dimension_type dim, bool has_dimensions) const
{
return text_placement_info_ptr(new text_placement_info_dummy(
return text_placement_info_ptr(boost::make_shared<text_placement_info_dummy>(
this, scale_factor, dim, has_dimensions));
}

View File

@ -19,7 +19,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*****************************************************************************/
#include <mapnik/text_placements/list.hpp>
#include <boost/make_shared.hpp>
namespace mapnik
{
@ -56,7 +59,7 @@ text_symbolizer_properties & text_placements_list::get(unsigned i)
text_placement_info_ptr text_placements_list::get_placement_info(
double scale_factor, dimension_type dim, bool has_dimensions) const
{
return text_placement_info_ptr(new text_placement_info_list(this,
return text_placement_info_ptr(boost::make_shared<text_placement_info_list>(this,
scale_factor, dim, has_dimensions));
}
@ -89,7 +92,8 @@ text_placements_ptr text_placements_list::from_xml(boost::property_tree::ptree c
list->defaults.from_xml(xml, fontsets);
ptree::const_iterator itr = xml.begin();
ptree::const_iterator end = xml.end();
for( ;itr != end; ++itr) {
for( ;itr != end; ++itr)
{
if ((itr->first.find('<') != std::string::npos) || (itr->first != "Placement")) continue;
//TODO: ensure_attrs(symIter->second, "TextSymbolizer/Placement", s_common.str());
text_symbolizer_properties &p = list->add();

View File

@ -28,6 +28,7 @@
#include <boost/spirit/include/qi.hpp>
#include <boost/spirit/include/phoenix_core.hpp>
#include <boost/spirit/include/phoenix_stl.hpp>
#include <boost/make_shared.hpp>
namespace mapnik
{
@ -101,7 +102,7 @@ bool text_placement_info_simple::next_position_only()
text_placement_info_ptr text_placements_simple::get_placement_info(
double scale_factor, dimension_type dim, bool has_dimensions) const
{
return text_placement_info_ptr(new text_placement_info_simple(this,
return text_placement_info_ptr(boost::make_shared<text_placement_info_simple>(this,
scale_factor, dim, has_dimensions));
}
@ -147,7 +148,7 @@ void text_placements_simple::set_positions(std::string positions)
std::cerr << "WARNING: Could not parse text_placement_simple placement string ('" << positions << "').\n";
}
if (direction_.size() == 0) {
std::cerr << "WARNING: text_placements_simple with no valid placments! ('"<< positions<<"')\n";
std::cerr << "WARNING: text_placements_simple with no valid placements! ('"<< positions<<"')\n";
}
}
@ -168,7 +169,7 @@ std::string text_placements_simple::get_positions()
text_placements_ptr text_placements_simple::from_xml(boost::property_tree::ptree const &xml, fontset_map const & fontsets)
{
text_placements_ptr ptr = text_placements_ptr(new text_placements_simple(
text_placements_ptr ptr = text_placements_ptr(boost::make_shared<text_placements_simple>(
get_attr<std::string>(xml, "placements", "X")));
ptr->defaults.from_xml(xml, fontsets);
return ptr;