150 {
151 it->Begin();
152 do {
153 int left, top, right, bottom;
155 PTIsTextType(it->BlockType()) && right - left > 800 && bottom - top > 200) {
156 const PAGE_RES_IT *pr_it = it->PageResIt();
157 POLY_BLOCK *pb = pr_it->block()->block->pdblk.poly_block();
158 CHECK(pb !=
nullptr);
159 FCOORD skew = pr_it->block()->block->skew();
162
163 MutableIterator word_it = *it;
164 do {
165 const PAGE_RES_IT *w_it = word_it.PageResIt();
166
167 C_BLOB_IT b_it(w_it->word()->word->cblob_list());
168 for (b_it.mark_cycle_pt(); !b_it.cycled_list(); b_it.forward()) {
169 C_BLOB *blob = b_it.data();
170
171 C_OUTLINE_IT ol_it(blob->out_list());
172 for (ol_it.mark_cycle_pt(); !ol_it.cycled_list(); ol_it.forward()) {
173 C_OUTLINE *ol = ol_it.data();
174 TBOX box = ol->bounding_box();
175 ICOORD middle((box.left() + box.right()) / 2, (box.top() + box.bottom()) / 2);
176 EXPECT_EQ(winding_target, pb->winding_number(middle));
177 }
178 }
181 }
183 }
#define EXPECT_EQ(val1, val2)
#define EXPECT_GT(val1, val2)