Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

crundel: add set_displacement(position) method to text_symbolizer

  • Loading branch information...
commit 03d809bb4f3f41277d59fb375615724f25fe5ab8 1 parent 48311f3
@rcoup rcoup authored
Showing with 7 additions and 1 deletion.
  1. +1 −0  include/mapnik/text_symbolizer.hpp
  2. +6 −1 src/text_symbolizer.cpp
View
1  include/mapnik/text_symbolizer.hpp
@@ -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
7 src/text_symbolizer.cpp
@@ -438,11 +438,16 @@ position const& text_symbolizer::get_anchor() const
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));
}
+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();
Please sign in to comment.
Something went wrong with that request. Please try again.