this_rx = (uint32_t) rint (tx);
this_ry = (uint32_t) rint (ty);
- if (view_index && pi != npoints && (this_rx == prev_rx) && (this_ry == prev_ry) ||
- ((this_rx - prev_rx) < (box_size + 2))) {
+ if (view_index && pi != npoints && /* not the first, not the last */
+ (((this_rx == prev_rx) && (this_ry == prev_ry)) || /* same point */
+ (((this_rx - prev_rx) < (box_size + 2)) && /* too close horizontally */
+ ((abs ((int)(this_ry - prev_ry)) < (int) (box_size + 2)))))) { /* too close vertically */
continue;
- }
+ }
/* ok, we should display this point */
/* discard extra CP's to avoid confusing ourselves */
- cerr << "here we are, view_index = " << view_index << " cp size = " << control_points.size() << " np = " << npoints << endl;
-
while (control_points.size() > view_index) {
ControlPoint* cp = control_points.back();
control_points.pop_back ();