Mercurial > hgrepos > Python2 > PyMuPDF
comparison mupdf-source/thirdparty/tesseract/src/textord/gap_map.h @ 2:b50eed0cc0ef upstream
ADD: MuPDF v1.26.7: the MuPDF source as downloaded by a default build of PyMuPDF 1.26.4.
The directory name has changed: no version number in the expanded directory now.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Mon, 15 Sep 2025 11:43:07 +0200 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 1:1d09e1dec1d9 | 2:b50eed0cc0ef |
|---|---|
| 1 // Licensed under the Apache License, Version 2.0 (the "License"); | |
| 2 // you may not use this file except in compliance with the License. | |
| 3 // You may obtain a copy of the License at | |
| 4 // http://www.apache.org/licenses/LICENSE-2.0 | |
| 5 // Unless required by applicable law or agreed to in writing, software | |
| 6 // distributed under the License is distributed on an "AS IS" BASIS, | |
| 7 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 8 // See the License for the specific language governing permissions and | |
| 9 // limitations under the License. | |
| 10 | |
| 11 #ifndef GAP_MAP_H | |
| 12 #define GAP_MAP_H | |
| 13 | |
| 14 #include "blobbox.h" | |
| 15 | |
| 16 namespace tesseract { | |
| 17 | |
| 18 class GAPMAP { | |
| 19 public: | |
| 20 GAPMAP( // constructor | |
| 21 TO_BLOCK *block); | |
| 22 | |
| 23 ~GAPMAP() { // destructor | |
| 24 delete[] map; | |
| 25 } | |
| 26 | |
| 27 bool table_gap( // Is gap a table? | |
| 28 int16_t left, // From here | |
| 29 int16_t right); // To here | |
| 30 | |
| 31 private: | |
| 32 int16_t total_rows; // in block | |
| 33 int16_t min_left; // Left extreme | |
| 34 int16_t max_right; // Right extreme | |
| 35 int16_t bucket_size; // half an x ht | |
| 36 int16_t *map; // empty counts | |
| 37 int16_t map_max; // map[0..max_map] defined | |
| 38 bool any_tabs; | |
| 39 }; | |
| 40 | |
| 41 /*-----------------------------*/ | |
| 42 | |
| 43 extern BOOL_VAR_H(gapmap_debug); | |
| 44 extern BOOL_VAR_H(gapmap_use_ends); | |
| 45 extern BOOL_VAR_H(gapmap_no_isolated_quanta); | |
| 46 extern double_VAR_H(gapmap_big_gaps); | |
| 47 | |
| 48 } // namespace tesseract | |
| 49 | |
| 50 #endif |
