+ more property goodness on the TextSymbolizer from Python (springmeyer)
This commit is contained in:
parent
fb98b98e64
commit
a45e93b79a
3 changed files with 39 additions and 0 deletions
|
@ -63,6 +63,26 @@ void export_text_symbolizer()
|
|||
.add_property("force_odd_labels",
|
||||
&text_symbolizer::get_force_odd_labels,
|
||||
&text_symbolizer::set_force_odd_labels)
|
||||
|
||||
.add_property("fontset",
|
||||
make_function(&text_symbolizer::get_fontset,return_value_policy<copy_const_reference>()),
|
||||
&text_symbolizer::set_fontset)
|
||||
|
||||
.add_property("fill",
|
||||
make_function(&text_symbolizer::get_fill,return_value_policy<copy_const_reference>()),
|
||||
&text_symbolizer::set_fill)
|
||||
.add_property("name",
|
||||
make_function(&text_symbolizer::get_name,return_value_policy<copy_const_reference>()),
|
||||
&text_symbolizer::set_name)
|
||||
|
||||
.add_property("text_size",
|
||||
&text_symbolizer::get_text_size,
|
||||
&text_symbolizer::set_text_size)
|
||||
|
||||
.add_property("face_name",
|
||||
make_function(&text_symbolizer::get_face_name,return_value_policy<copy_const_reference>()),
|
||||
&text_symbolizer::set_face_name)
|
||||
|
||||
.add_property("max_char_angle_delta",
|
||||
&text_symbolizer::get_max_char_angle_delta,
|
||||
&text_symbolizer::set_max_char_angle_delta)
|
||||
|
@ -73,6 +93,7 @@ void export_text_symbolizer()
|
|||
&text_symbolizer::get_minimum_distance,
|
||||
&text_symbolizer::set_minimum_distance)
|
||||
.def("displacement",&text_symbolizer::set_displacement)
|
||||
.def("anchor",&text_symbolizer::set_anchor)
|
||||
.add_property("label_placement",
|
||||
&text_symbolizer::get_label_placement,
|
||||
&text_symbolizer::set_label_placement,
|
||||
|
|
|
@ -55,6 +55,7 @@ namespace mapnik
|
|||
text_symbolizer(text_symbolizer const& rhs);
|
||||
text_symbolizer& operator=(text_symbolizer const& rhs);
|
||||
std::string const& get_name() const;
|
||||
void set_name(std::string name);
|
||||
unsigned get_text_ratio() const; // target ratio for text bounding box in pixels
|
||||
void set_text_ratio(unsigned ratio);
|
||||
unsigned get_wrap_width() const; // width to wrap text at, or trigger ratio
|
||||
|
@ -68,11 +69,13 @@ namespace mapnik
|
|||
double get_max_char_angle_delta() const; // maximum change in angle between adjacent characters
|
||||
void set_max_char_angle_delta(double angle);
|
||||
unsigned get_text_size() const;
|
||||
void set_text_size(unsigned size);
|
||||
std::string const& get_face_name() const;
|
||||
void set_face_name(std::string face_name);
|
||||
FontSet const& get_fontset() const;
|
||||
void set_fontset(FontSet fontset);
|
||||
color const& get_fill() const;
|
||||
void set_fill(color const& fill);
|
||||
void set_halo_fill(color const& fill);
|
||||
color const& get_halo_fill() const;
|
||||
void set_halo_radius(unsigned radius);
|
||||
|
|
|
@ -133,6 +133,11 @@ namespace mapnik
|
|||
return name_;
|
||||
}
|
||||
|
||||
void text_symbolizer::set_name(std::string name)
|
||||
{
|
||||
name_ = name;
|
||||
}
|
||||
|
||||
std::string const& text_symbolizer::get_face_name() const
|
||||
{
|
||||
return face_name_;
|
||||
|
@ -213,10 +218,20 @@ namespace mapnik
|
|||
max_char_angle_delta_ = angle;
|
||||
}
|
||||
|
||||
void text_symbolizer::set_text_size(unsigned size)
|
||||
{
|
||||
size_ = size;
|
||||
}
|
||||
|
||||
unsigned text_symbolizer::get_text_size() const
|
||||
{
|
||||
return size_;
|
||||
}
|
||||
|
||||
void text_symbolizer::set_fill(color const& fill)
|
||||
{
|
||||
fill_ = fill;
|
||||
}
|
||||
|
||||
color const& text_symbolizer::get_fill() const
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue