use 'avoid_edges' parameter for point placement
This commit is contained in:
parent
01de9d9e8c
commit
6eadaafd49
1 changed files with 11 additions and 5 deletions
|
@ -355,11 +355,14 @@ namespace mapnik
|
|||
current_placement->starting_y - y - ci.height);
|
||||
}
|
||||
|
||||
if (!dimensions_.intersects(e) || !detector_.has_placement(e, p.info.get_string(), p.minimum_distance))
|
||||
if (!dimensions_.intersects(e) ||
|
||||
!detector_.has_placement(e, p.info.get_string(), p.minimum_distance))
|
||||
{
|
||||
return ;
|
||||
return;
|
||||
}
|
||||
|
||||
if (p.avoid_edges && !dimensions_.contains(e)) return;
|
||||
|
||||
p.envelopes.push(e);
|
||||
}
|
||||
x += ci.width;
|
||||
|
@ -462,7 +465,8 @@ namespace mapnik
|
|||
angle_delta -= 2*M_PI;
|
||||
while (angle_delta < -M_PI)
|
||||
angle_delta += 2*M_PI;
|
||||
if (p.max_char_angle_delta > 0 && fabs(angle_delta) > p.max_char_angle_delta*(M_PI/180))
|
||||
if (p.max_char_angle_delta > 0 &&
|
||||
fabs(angle_delta) > p.max_char_angle_delta*(M_PI/180))
|
||||
{
|
||||
status = false;
|
||||
}
|
||||
|
@ -569,7 +573,9 @@ namespace mapnik
|
|||
|
||||
template <typename DetectorT>
|
||||
template <typename PathT>
|
||||
bool placement_finder<DetectorT>::build_path_follow(placement & p, double target_distance, PathT & shape_path)
|
||||
bool placement_finder<DetectorT>::build_path_follow(placement & p,
|
||||
double target_distance,
|
||||
PathT & shape_path)
|
||||
{
|
||||
double new_x = 0.0;
|
||||
double new_y = 0.0;
|
||||
|
|
Loading…
Reference in a new issue