Adds the supplied boxes and transcriptions that correspond to the correct page number.
| 309 | // Adds the supplied boxes and transcriptions that correspond to the correct |
| 310 | // page number. |
| 311 | void ImageData::AddBoxes(const GenericVector<TBOX>& boxes, |
| 312 | const GenericVector<STRING>& texts, |
| 313 | const GenericVector<int>& box_pages) { |
| 314 | // Copy the boxes and make the transcription. |
| 315 | for (int i = 0; i < box_pages.size(); ++i) { |
| 316 | if (page_number_ >= 0 && box_pages[i] != page_number_) continue; |
| 317 | transcription_ += texts[i]; |
| 318 | boxes_.push_back(boxes[i]); |
| 319 | box_texts_.push_back(texts[i]); |
| 320 | } |
| 321 | } |
| 322 | |
| 323 | // Saves the given Pix as a PNG-encoded string and destroys it. |
| 324 | void ImageData::SetPixInternal(Pix* pix, GenericVector<char>* image_data) { |
no test coverage detected