Tesseract 3.02

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

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