remove force_odd_labels - refs #2120
This commit is contained in:
parent
1e53351467
commit
3339255b18
8 changed files with 0 additions and 34 deletions
|
@ -976,17 +976,6 @@ class _TextSymbolizer(TextSymbolizer,_injector):
|
||||||
self.properties.maximum_angle_char_delta = maximum_angle_char_delta
|
self.properties.maximum_angle_char_delta = maximum_angle_char_delta
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@property
|
|
||||||
def force_odd_labels(self):
|
|
||||||
return self.properties.force_odd_labels
|
|
||||||
|
|
||||||
@force_odd_labels.setter
|
|
||||||
def force_odd_labels(self, force_odd_labels):
|
|
||||||
self.properties.force_odd_labels = force_odd_labels
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def allow_overlap(self):
|
def allow_overlap(self):
|
||||||
return self.properties.allow_overlap
|
return self.properties.allow_overlap
|
||||||
|
|
|
@ -345,9 +345,6 @@ void export_shield_symbolizer()
|
||||||
.add_property("fontset",
|
.add_property("fontset",
|
||||||
make_function(&shield_symbolizer::get_fontset,return_value_policy<copy_const_reference>()),
|
make_function(&shield_symbolizer::get_fontset,return_value_policy<copy_const_reference>()),
|
||||||
&shield_symbolizer::set_fontset)
|
&shield_symbolizer::set_fontset)
|
||||||
.add_property("force_odd_labels",
|
|
||||||
&shield_symbolizer::get_force_odd_labels,
|
|
||||||
&shield_symbolizer::set_force_odd_labels)
|
|
||||||
.add_property("halo_fill",
|
.add_property("halo_fill",
|
||||||
make_function(&shield_symbolizer::get_halo_fill,return_value_policy<copy_const_reference>()),
|
make_function(&shield_symbolizer::get_halo_fill,return_value_policy<copy_const_reference>()),
|
||||||
&shield_symbolizer::set_halo_fill)
|
&shield_symbolizer::set_halo_fill)
|
||||||
|
|
|
@ -431,7 +431,6 @@ void export_text_placement()
|
||||||
.def_readwrite("minimum_padding", &text_symbolizer_properties::minimum_padding)
|
.def_readwrite("minimum_padding", &text_symbolizer_properties::minimum_padding)
|
||||||
.def_readwrite("minimum_path_length", &text_symbolizer_properties::minimum_path_length)
|
.def_readwrite("minimum_path_length", &text_symbolizer_properties::minimum_path_length)
|
||||||
.def_readwrite("maximum_angle_char_delta", &text_symbolizer_properties::max_char_angle_delta)
|
.def_readwrite("maximum_angle_char_delta", &text_symbolizer_properties::max_char_angle_delta)
|
||||||
.def_readwrite("force_odd_labels", &text_symbolizer_properties::force_odd_labels)
|
|
||||||
.def_readwrite("allow_overlap", &text_symbolizer_properties::allow_overlap)
|
.def_readwrite("allow_overlap", &text_symbolizer_properties::allow_overlap)
|
||||||
.def_readwrite("largest_bbox_only", &text_symbolizer_properties::largest_bbox_only)
|
.def_readwrite("largest_bbox_only", &text_symbolizer_properties::largest_bbox_only)
|
||||||
.def_readwrite("text_ratio", &text_symbolizer_properties::text_ratio)
|
.def_readwrite("text_ratio", &text_symbolizer_properties::text_ratio)
|
||||||
|
|
|
@ -163,8 +163,6 @@ struct MAPNIK_DECL text_symbolizer_properties
|
||||||
double minimum_padding;
|
double minimum_padding;
|
||||||
double minimum_path_length;
|
double minimum_path_length;
|
||||||
double max_char_angle_delta;
|
double max_char_angle_delta;
|
||||||
/** Always try render an odd amount of labels */
|
|
||||||
bool force_odd_labels;
|
|
||||||
bool allow_overlap;
|
bool allow_overlap;
|
||||||
/** Only consider geometry with largest bbox (polygons) */
|
/** Only consider geometry with largest bbox (polygons) */
|
||||||
bool largest_bbox_only;
|
bool largest_bbox_only;
|
||||||
|
|
|
@ -93,8 +93,6 @@ struct MAPNIK_DECL text_symbolizer : public symbolizer_base
|
||||||
void set_label_spacing(double spacing);
|
void set_label_spacing(double spacing);
|
||||||
double get_label_position_tolerance() const func_deprecated; //distance the label can be moved on the line to fit, if 0 the default is used
|
double get_label_position_tolerance() const func_deprecated; //distance the label can be moved on the line to fit, if 0 the default is used
|
||||||
void set_label_position_tolerance(double tolerance);
|
void set_label_position_tolerance(double tolerance);
|
||||||
bool get_force_odd_labels() const func_deprecated; // try render an odd amount of labels
|
|
||||||
void set_force_odd_labels(bool force);
|
|
||||||
double get_max_char_angle_delta() const func_deprecated; // maximum change in angle between adjacent characters
|
double get_max_char_angle_delta() const func_deprecated; // maximum change in angle between adjacent characters
|
||||||
void set_max_char_angle_delta(double angle);
|
void set_max_char_angle_delta(double angle);
|
||||||
double get_text_size() const func_deprecated;
|
double get_text_size() const func_deprecated;
|
||||||
|
|
|
@ -144,8 +144,6 @@ void placement_finder<DetectorT>::find_point_placements(T & shape_path)
|
||||||
if (p.label_spacing > 0)
|
if (p.label_spacing > 0)
|
||||||
num_labels = static_cast<int> (floor(total_distance / pi.get_actual_label_spacing()));
|
num_labels = static_cast<int> (floor(total_distance / pi.get_actual_label_spacing()));
|
||||||
|
|
||||||
if (p.force_odd_labels && num_labels % 2 == 0)
|
|
||||||
num_labels--;
|
|
||||||
if (num_labels <= 0)
|
if (num_labels <= 0)
|
||||||
num_labels = 1;
|
num_labels = 1;
|
||||||
|
|
||||||
|
@ -589,8 +587,6 @@ void placement_finder<DetectorT>::find_line_placements(PathT & shape_path)
|
||||||
if (p.label_spacing > 0)
|
if (p.label_spacing > 0)
|
||||||
num_labels = static_cast<int>(floor(total_distance / (pi.get_actual_label_spacing() + string_width_)));
|
num_labels = static_cast<int>(floor(total_distance / (pi.get_actual_label_spacing() + string_width_)));
|
||||||
|
|
||||||
if (p.force_odd_labels && (num_labels % 2 == 0))
|
|
||||||
num_labels--;
|
|
||||||
if (num_labels <= 0)
|
if (num_labels <= 0)
|
||||||
num_labels = 1;
|
num_labels = 1;
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,6 @@ text_symbolizer_properties::text_symbolizer_properties() :
|
||||||
minimum_padding(0.0),
|
minimum_padding(0.0),
|
||||||
minimum_path_length(0.0),
|
minimum_path_length(0.0),
|
||||||
max_char_angle_delta(22.5 * M_PI/180.0),
|
max_char_angle_delta(22.5 * M_PI/180.0),
|
||||||
force_odd_labels(false),
|
|
||||||
allow_overlap(false),
|
allow_overlap(false),
|
||||||
largest_bbox_only(true),
|
largest_bbox_only(true),
|
||||||
text_ratio(0.0),
|
text_ratio(0.0),
|
||||||
|
|
|
@ -290,16 +290,6 @@ void text_symbolizer::set_label_position_tolerance(double tolerance)
|
||||||
placement_options_->defaults.label_position_tolerance = tolerance;
|
placement_options_->defaults.label_position_tolerance = tolerance;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool text_symbolizer::get_force_odd_labels() const
|
|
||||||
{
|
|
||||||
return placement_options_->defaults.force_odd_labels;
|
|
||||||
}
|
|
||||||
|
|
||||||
void text_symbolizer::set_force_odd_labels(bool force)
|
|
||||||
{
|
|
||||||
placement_options_->defaults.force_odd_labels = force;
|
|
||||||
}
|
|
||||||
|
|
||||||
double text_symbolizer::get_max_char_angle_delta() const
|
double text_symbolizer::get_max_char_angle_delta() const
|
||||||
{
|
{
|
||||||
return placement_options_->defaults.max_char_angle_delta;
|
return placement_options_->defaults.max_char_angle_delta;
|
||||||
|
|
Loading…
Reference in a new issue