+ mapnik_text_overlap.patch (Marcin Rudowski)

This commit is contained in:
Artem Pavlenko 2009-02-02 23:37:16 +00:00
parent 760d82f511
commit e27a71cc39
2 changed files with 5 additions and 1 deletions

View file

@ -67,6 +67,7 @@ namespace mapnik
double max_char_angle_delta;
double minimum_distance;
bool avoid_edges;
bool allow_overlap;
bool has_dimensions;
std::pair<double, double> dimensions;
};

View file

@ -63,6 +63,7 @@ namespace mapnik
minimum_distance(sym.get_minimum_distance()),
avoid_edges(sym.get_avoid_edges()),
has_dimensions(has_dimensions_),
allow_overlap(false),
dimensions(std::make_pair(sym.get_image()->width(),
sym.get_image()->height()))
{
@ -82,6 +83,7 @@ namespace mapnik
minimum_distance(sym.get_minimum_distance()),
avoid_edges(sym.get_avoid_edges()),
has_dimensions(false),
allow_overlap(sym.get_allow_overlap()),
dimensions()
{
}
@ -343,7 +345,8 @@ namespace mapnik
}
if (!dimensions_.intersects(e) ||
!detector_.has_point_placement(e, p.minimum_distance))
(!p.allow_overlap && !detector_.has_point_placement(e,
p.minimum_distance)))
{
return;
}