small cleanup

This commit is contained in:
Artem Pavlenko 2007-02-25 10:54:36 +00:00
parent 2513da8f79
commit 4cc771546d

View file

@ -207,21 +207,14 @@ namespace mapnik
{
std::pair<double, double> string_dimensions = p->info->get_dimensions();
double string_width = string_dimensions.first;
// double string_height = string_dimensions.second;
// for (unsigned int ii = 0; ii < p->info->num_characters(); ++ii)
// std::clog << static_cast<char> (p->info->at(ii).character);
// std::clog << std::endl;
double distance = p->get_total_distance();
if (string_width > distance)
{
//std::clog << "String longer than segment, bailing" << std::endl;
return false;
}
int num_labels = 0;
if (p->label_spacing)
num_labels = static_cast<int> (floor(distance / (p->label_spacing + string_width)));
@ -270,7 +263,9 @@ namespace mapnik
bool FoundPlacement = false;
for (std::vector<double>::const_iterator itr = ideal_label_distances.begin(); itr < ideal_label_distances.end(); ++itr)
std::vector<double>::const_iterator itr = ideal_label_distances.begin();
std::vector<double>::const_iterator end = ideal_label_distances.end();
for (; itr != end; ++itr)
{
//std::clog << "Trying to find txt placement at distance: " << *itr << std::endl;
for (double i = 0; i < tolerance; i += delta)
@ -511,7 +506,9 @@ namespace mapnik
}
p->current_placement.path.add_node(c, render_x - p->current_placement.starting_x, -render_y + p->current_placement.starting_y, render_angle);
p->current_placement.path.add_node(c,render_x - p->current_placement.starting_x,
-render_y + p->current_placement.starting_y,
render_angle);
x += next_char_x;
y -= next_char_y;
}