| 311 | **********************************************************************/ |
| 312 | |
| 313 | void BLOCK_RECT_IT::forward() { //next rectangle |
| 314 | if (!left_it.empty ()) { //non-empty list |
| 315 | if (left_it.data_relative (1)->y () == ymax) |
| 316 | left_it.forward (); //move to meet top |
| 317 | if (right_it.data_relative (1)->y () == ymax) |
| 318 | right_it.forward (); |
| 319 | //last is special |
| 320 | if (left_it.at_last () || right_it.at_last ()) { |
| 321 | left_it.move_to_first (); //restart |
| 322 | right_it.move_to_first (); |
| 323 | //now at bottom |
| 324 | ymin = left_it.data ()->y (); |
| 325 | } |
| 326 | else { |
| 327 | ymin = ymax; //new bottom |
| 328 | } |
| 329 | //next point |
| 330 | ymax = left_it.data_relative (1)->y (); |
| 331 | if (right_it.data_relative (1)->y () < ymax) |
| 332 | //least step forward |
| 333 | ymax = right_it.data_relative (1)->y (); |
| 334 | } |
| 335 | } |
| 336 | |
| 337 | |
| 338 | /********************************************************************** |
no test coverage detected