crundel: add set_displacement(position) method to text_symbolizer
This commit is contained in:
parent
fae9f98014
commit
e8c281f593
2 changed files with 7 additions and 1 deletions
|
@ -101,6 +101,7 @@ struct MAPNIK_DECL text_symbolizer : public symbolizer_base
|
||||||
void set_anchor(double x, double y);
|
void set_anchor(double x, double y);
|
||||||
position const& get_anchor() const;
|
position const& get_anchor() const;
|
||||||
void set_displacement(double x, double y);
|
void set_displacement(double x, double y);
|
||||||
|
void set_displacement(position const& p);
|
||||||
position const& get_displacement() const;
|
position const& get_displacement() const;
|
||||||
void set_avoid_edges(bool avoid);
|
void set_avoid_edges(bool avoid);
|
||||||
bool get_avoid_edges() const;
|
bool get_avoid_edges() const;
|
||||||
|
|
|
@ -438,11 +438,16 @@ position const& text_symbolizer::get_anchor() const
|
||||||
return anchor_;
|
return anchor_;
|
||||||
}
|
}
|
||||||
|
|
||||||
void text_symbolizer::set_displacement(double x, double y)
|
void text_symbolizer::set_displacement(double x, double y)
|
||||||
{
|
{
|
||||||
placement_options_->set_default_displacement(boost::make_tuple(x,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
|
position const& text_symbolizer::get_displacement() const
|
||||||
{
|
{
|
||||||
return placement_options_->get_default_displacement();
|
return placement_options_->get_default_displacement();
|
||||||
|
|
Loading…
Reference in a new issue