|
Tesseract
3.02
|
Go to the source code of this file.
Functions | |
| bool | read_unlv_file (STRING name, inT32 xsize, inT32 ysize, BLOCK_LIST *blocks) |
| void | FullPageBlock (int width, int height, BLOCK_LIST *blocks) |
| void FullPageBlock | ( | int | width, |
| int | height, | ||
| BLOCK_LIST * | blocks | ||
| ) |
Definition at line 69 of file blread.cpp.
Definition at line 37 of file blread.cpp.
{
FILE *pdfp; //file pointer
BLOCK *block; //current block
int x; //current top-down coords
int y;
int width; //of current block
int height;
BLOCK_IT block_it = blocks; //block iterator
name += UNLV_EXT; //add extension
if ((pdfp = fopen (name.string (), "rb")) == NULL) {
return false; //didn't read one
}
else {
while (fscanf (pdfp, "%d %d %d %d %*s", &x, &y, &width, &height) >= 4) {
//make rect block
block = new BLOCK (name.string (), TRUE, 0, 0,
(inT16) x, (inT16) (ysize - y - height),
(inT16) (x + width), (inT16) (ysize - y));
//on end of list
block_it.add_to_end (block);
}
fclose(pdfp);
}
return true;
}