rectangle iterator
More...
#include <pdblock.h>
rectangle iterator
Definition at line 156 of file pdblock.h.
◆ BLOCK_LINE_IT()
tesseract::BLOCK_LINE_IT::BLOCK_LINE_IT |
( |
PDBLK * |
blkptr | ) |
|
|
inline |
constructor
- Parameters
-
Definition at line 160 of file pdblock.h.
160 : rect_it(blkptr) {
161 block = blkptr;
162 }
◆ get_line()
get a line
- Parameters
-
y | line to get |
xext | output extent |
Definition at line 353 of file pdblock.cpp.
356 {
357 ICOORD bleft;
358 ICOORD tright;
359
360
362 if (
y < bleft.y() ||
y >= tright.y()) {
363
365 }
366
367
369
370 if (
y >= bleft.y() &&
y < tright.y()) {
371
372 xext = tright.x() - bleft.x();
373 return bleft.x();
374 }
376
378
379 if (
y >= bleft.y() &&
y < tright.y()) {
380
381 xext = tright.x() - bleft.x();
382 return bleft.x();
383 }
384 }
386 return 0;
387}
constexpr ERRCODE BADBLOCKLINE("Y coordinate in block out of bounds")
constexpr ERRCODE LOSTBLOCKLINE("Can't find rectangle for line")
void bounding_box(ICOORD &bottom_left, ICOORD &top_right) const
get box
void forward()
next rectangle
void start_block()
start iteration
bool cycled_rects() const
test end
void bounding_box(ICOORD &bleft, ICOORD &tright)
void error(const char *caller, TessErrorLogCode action, const char *format,...) const __attribute__((format(gnu_printf
◆ set_to_block()
void tesseract::BLOCK_LINE_IT::set_to_block |
( |
PDBLK * |
blkptr | ) |
|
|
inline |
start (new) block
- Parameters
-
Definition at line 166 of file pdblock.h.
166 {
167 block = blkptr;
168
170 }
void set_to_block(PDBLK *blkptr)
start (new) block
The documentation for this class was generated from the following files:
- /media/home/debian/src/github/tesseract-ocr/tesseract/src/ccstruct/pdblock.h
- /media/home/debian/src/github/tesseract-ocr/tesseract/src/ccstruct/pdblock.cpp