Helper calls ComputeEdgeOffsets or ComputeBinaryOffsets recursively on the outline list and its children.
| 391 | // Helper calls ComputeEdgeOffsets or ComputeBinaryOffsets recursively on the |
| 392 | // outline list and its children. |
| 393 | static void ComputeEdgeOffsetsOutlineList(int threshold, Pix* pix, |
| 394 | C_OUTLINE_LIST *list) { |
| 395 | C_OUTLINE_IT it(list); |
| 396 | for (it.mark_cycle_pt(); !it.cycled_list(); it.forward()) { |
| 397 | C_OUTLINE* outline = it.data(); |
| 398 | if (pix != NULL && pixGetDepth(pix) == 8) |
| 399 | outline->ComputeEdgeOffsets(threshold, pix); |
| 400 | else |
| 401 | outline->ComputeBinaryOffsets(); |
| 402 | if (!outline->child()->empty()) |
| 403 | ComputeEdgeOffsetsOutlineList(threshold, pix, outline->child()); |
| 404 | } |
| 405 | } |
| 406 | |
| 407 | // Adds sub-pixel resolution EdgeOffsets for the outlines using greyscale |
| 408 | // if the supplied pix is 8-bit or the binary edges if NULL. |
no test coverage detected