tesseract  5.0.0
drawtord.h
Go to the documentation of this file.
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 
32 extern ScrollView *to_win;
33 extern FILE *to_debug;
34 // Creates a static display window for textord, and returns a pointer to it.
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
void plot_fp_cells(ScrollView *win, ScrollView::Color colour, BLOBNBOX_IT *blob_it, int16_t pitch, int16_t blob_count, STATS *projection, int16_t projection_left, int16_t projection_right, float projection_scale)
Definition: drawtord.cpp:309
void plot_fp_cells2(ScrollView *win, ScrollView::Color colour, TO_ROW *row, FPSEGPT_LIST *seg_list)
Definition: drawtord.cpp:353
bool textord_show_fixed_cuts
Definition: drawtord.cpp:35
ScrollView * to_win
Definition: drawtord.cpp:37
void close_to_win()
Definition: drawtord.cpp:56
void create_todebug_win()
void plot_box_list(ScrollView *win, BLOBNBOX_LIST *list, ScrollView::Color body_colour)
Definition: drawtord.cpp:69
void plot_to_row(TO_ROW *row, ScrollView::Color colour, FCOORD rotation)
Definition: drawtord.cpp:89
void plot_parallel_row(TO_ROW *row, float gradient, int32_t left, ScrollView::Color colour, FCOORD rotation)
Definition: drawtord.cpp:122
BOOL_VAR_H(wordrec_display_splits)
void draw_meanlines(TO_BLOCK *block, float gradient, int32_t left, ScrollView::Color colour, FCOORD rotation)
Definition: drawtord.cpp:203
void plot_word_decisions(ScrollView *win, int16_t pitch, TO_ROW *row)
Definition: drawtord.cpp:238
ScrollView * create_to_win(ICOORD page_tr)
Definition: drawtord.cpp:47
void plot_row_cells(ScrollView *win, ScrollView::Color colour, TO_ROW *row, float xshift, ICOORDELT_LIST *cells)
Definition: drawtord.cpp:387
FILE * to_debug
void draw_occupation(int32_t xleft, int32_t ybottom, int32_t min_y, int32_t max_y, int32_t occupation[], int32_t thresholds[])
Definition: drawtord.cpp:161
integer coordinate
Definition: points.h:36