comparison mupdf-source/thirdparty/tesseract/src/textord/drawtord.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 /**********************************************************************
2 * File: drawtord.h (Formerly drawto.h)
3 * Description: Draw things to do with textord.
4 * Author: Ray Smith
5 *
6 * (C) Copyright 1992, Hewlett-Packard Ltd.
7 ** Licensed under the Apache License, Version 2.0 (the "License");
8 ** you may not use this file except in compliance with the License.
9 ** You may obtain a copy of the License at
10 ** http://www.apache.org/licenses/LICENSE-2.0
11 ** Unless required by applicable law or agreed to in writing, software
12 ** distributed under the License is distributed on an "AS IS" BASIS,
13 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 ** See the License for the specific language governing permissions and
15 ** limitations under the License.
16 *
17 **********************************************************************/
18
19 #ifndef DRAWTORD_H
20 #define DRAWTORD_H
21
22 #include "blobbox.h"
23 #include "params.h"
24 #include "pitsync1.h"
25 #include "scrollview.h"
26
27 namespace tesseract {
28
29 #define NO_SMD "none"
30
31 extern BOOL_VAR_H(textord_show_fixed_cuts);
32 extern ScrollView *to_win;
33 extern FILE *to_debug;
34 // Creates a static display window for textord, and returns a pointer to it.
35 ScrollView *create_to_win(ICOORD page_tr);
36 void close_to_win(); // Destroy the textord window.
37 void create_todebug_win(); // make gradients win
38 void plot_box_list( // make gradients win
39 ScrollView *win, // window to draw in
40 BLOBNBOX_LIST *list, // blob list
41 ScrollView::Color body_colour // colour to draw
42 );
43 void plot_to_row( // draw a row
44 TO_ROW *row, // row to draw
45 ScrollView::Color colour, // colour to draw in
46 FCOORD rotation // rotation for line
47 );
48 void plot_parallel_row( // draw a row
49 TO_ROW *row, // row to draw
50 float gradient, // gradients of lines
51 int32_t left, // edge of block
52 ScrollView::Color colour, // colour to draw in
53 FCOORD rotation // rotation for line
54 );
55 void draw_occupation( // draw projection
56 int32_t xleft, // edge of block
57 int32_t ybottom, // bottom of block
58 int32_t min_y, // coordinate limits
59 int32_t max_y, int32_t occupation[], // projection counts
60 int32_t thresholds[] // for drop out
61 );
62 void draw_meanlines( // draw a block
63 TO_BLOCK *block, // block to draw
64 float gradient, // gradients of lines
65 int32_t left, // edge of block
66 ScrollView::Color colour, // colour to draw in
67 FCOORD rotation // rotation for line
68 );
69 void plot_word_decisions( // draw words
70 ScrollView *win, // window tro draw in
71 int16_t pitch, // of block
72 TO_ROW *row // row to draw
73 );
74 void plot_fp_cells( // draw words
75 ScrollView *win, // window tro draw in
76 ScrollView::Color colour, // colour of lines
77 BLOBNBOX_IT *blob_it, // blobs
78 int16_t pitch, // of block
79 int16_t blob_count, // no of real blobs
80 STATS *projection, // vertical
81 int16_t projection_left, // edges //scale factor
82 int16_t projection_right, float projection_scale);
83 void plot_fp_cells2( // draw words
84 ScrollView *win, // window tro draw in
85 ScrollView::Color colour, // colour of lines
86 TO_ROW *row, // for location
87 FPSEGPT_LIST *seg_list // segments to plot
88 );
89 void plot_row_cells( // draw words
90 ScrollView *win, // window tro draw in
91 ScrollView::Color colour, // colour of lines
92 TO_ROW *row, // for location
93 float xshift, // amount of shift
94 ICOORDELT_LIST *cells // cells to draw
95 );
96
97 } // namespace tesseract
98
99 #endif