Mercurial > hgrepos > Python2 > PyMuPDF
diff mupdf-source/thirdparty/tesseract/src/textord/underlin.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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mupdf-source/thirdparty/tesseract/src/textord/underlin.h Mon Sep 15 11:43:07 2025 +0200 @@ -0,0 +1,54 @@ +/********************************************************************** + * File: underlin.h (Formerly undrline.h) + * Description: Code to chop blobs apart from underlines. + * Author: Ray Smith + * + * (C) Copyright 1994, Hewlett-Packard Ltd. + ** Licensed under the Apache License, Version 2.0 (the "License"); + ** you may not use this file except in compliance with the License. + ** You may obtain a copy of the License at + ** http://www.apache.org/licenses/LICENSE-2.0 + ** Unless required by applicable law or agreed to in writing, software + ** distributed under the License is distributed on an "AS IS" BASIS, + ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ** See the License for the specific language governing permissions and + ** limitations under the License. + * + **********************************************************************/ + +#ifndef UNDERLIN_H +#define UNDERLIN_H + +#include "fpchop.h" + +namespace tesseract { + +extern double_VAR_H(textord_underline_offset); +extern BOOL_VAR_H(textord_restore_underlines); +void restore_underlined_blobs( // get chop points + TO_BLOCK *block // block to do +); +TO_ROW *most_overlapping_row( // find best row + TO_ROW_LIST *rows, // list of rows + BLOBNBOX *blob // blob to place +); +void find_underlined_blobs( // get chop points + BLOBNBOX *u_line, // underlined unit + QSPLINE *baseline, // actual baseline + float xheight, // height of line + float baseline_offset, // amount to shrinke it + ICOORDELT_LIST *chop_cells // places to chop +); +void vertical_cunderline_projection( // project outlines + C_OUTLINE *outline, // outline to project + QSPLINE *baseline, // actual baseline + float xheight, // height of line + float baseline_offset, // amount to shrinke it + STATS *lower_proj, // below baseline + STATS *middle_proj, // centre region + STATS *upper_proj // top region +); + +} // namespace tesseract + +#endif
