#include <pdblock.h>
Definition at line 116 of file pdblock.h.
◆ BLOCK_RECT_IT()
tesseract::BLOCK_RECT_IT::BLOCK_RECT_IT |
( |
PDBLK * |
blkptr | ) |
|
constructor
- Parameters
-
Definition at line 267 of file pdblock.cpp.
271 : left_it(&blkptr->leftside), right_it(&blkptr->rightside) {
274 if (!blkptr->leftside.empty()) {
void start_block()
start iteration
◆ bounding_box()
void tesseract::BLOCK_RECT_IT::bounding_box |
( |
ICOORD & |
bleft, |
|
|
ICOORD & |
tright |
|
) |
| |
|
inline |
current rectangle
- Parameters
-
bleft | bottom left |
tright | top right |
Definition at line 140 of file pdblock.h.
142 bleft = ICOORD(left_it.data()->x(), ymin);
144 tright = ICOORD(right_it.data()->x(), ymax);
◆ cycled_rects()
bool tesseract::BLOCK_RECT_IT::cycled_rects |
( |
| ) |
const |
|
inline |
test end
Definition at line 133 of file pdblock.h.
134 return left_it.cycled_list() && right_it.cycled_list();
◆ forward()
void tesseract::BLOCK_RECT_IT::forward |
( |
| ) |
|
next rectangle
Definition at line 321 of file pdblock.cpp.
322 if (!left_it.empty()) {
323 if (left_it.data_relative(1)->y() == ymax) {
326 if (right_it.data_relative(1)->y() == ymax) {
330 if (left_it.at_last() || right_it.at_last()) {
331 left_it.move_to_first();
332 right_it.move_to_first();
334 ymin = left_it.data()->y();
339 ymax = left_it.data_relative(1)->y();
340 if (right_it.data_relative(1)->y() < ymax) {
342 ymax = right_it.data_relative(1)->y();
◆ set_to_block()
void tesseract::BLOCK_RECT_IT::set_to_block |
( |
PDBLK * |
blkptr | ) |
|
start (new) block
Definition at line 285 of file pdblock.cpp.
289 left_it.set_to_list(&blkptr->leftside);
290 right_it.set_to_list(&blkptr->rightside);
291 if (!blkptr->leftside.empty()) {
◆ start_block()
void tesseract::BLOCK_RECT_IT::start_block |
( |
| ) |
|
start iteration
Definition at line 302 of file pdblock.cpp.
303 left_it.move_to_first();
304 right_it.move_to_first();
305 left_it.mark_cycle_pt();
306 right_it.mark_cycle_pt();
307 ymin = left_it.data()->y();
308 ymax = left_it.data_relative(1)->y();
309 if (right_it.data_relative(1)->y() < ymax) {
311 ymax = right_it.data_relative(1)->y();
The documentation for this class was generated from the following files: