crundel: add set_displacement(position) method to text_symbolizer

This commit is contained in:
Robert Coup 2011-10-19 23:58:56 -07:00
parent 48311f375c
commit 03d809bb4f
2 changed files with 7 additions and 1 deletions

View file

@ -101,6 +101,7 @@ struct MAPNIK_DECL text_symbolizer : public symbolizer_base
void set_anchor(double x, double y);
position const& get_anchor() const;
void set_displacement(double x, double y);
void set_displacement(position const& p);
position const& get_displacement() const;
void set_avoid_edges(bool avoid);
bool get_avoid_edges() const;

View file

@ -443,6 +443,11 @@ void text_symbolizer::set_displacement(double x, double y)
placement_options_->set_default_displacement(boost::make_tuple(x,y));
}
void text_symbolizer::set_displacement(position const& p)
{
placement_options_->set_default_displacement(p);
}
position const& text_symbolizer::get_displacement() const
{
return placement_options_->get_default_displacement();