Tesseract  3.02
 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 
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
void close_to_win()
Definition: drawtord.cpp:56
ScrollView * to_win
Definition: drawtord.cpp:40
void draw_meanlines(TO_BLOCK *block, float gradient, inT32 left, ScrollView::Color colour, FCOORD rotation)
Definition: drawtord.cpp:210
#define BOOL_VAR_H(name, val, comment)
Definition: params.h:239
#define NO_SMD
Definition: drawtord.h:29
void plot_fp_cells(ScrollView *win, ScrollView::Color colour, BLOBNBOX_IT *blob_it, inT16 pitch, inT16 blob_count, STATS *projection, inT16 projection_left, inT16 projection_right, float projection_scale)
Definition: drawtord.cpp:320
void plot_fp_cells2(ScrollView *win, ScrollView::Color colour, TO_ROW *row, FPSEGPT_LIST *seg_list)
Definition: drawtord.cpp:364
int inT32
Definition: host.h:102
#define FALSE
Definition: capi.h:28
bool textord_show_fixed_cuts
Definition: drawtord.cpp:38
char * to_debugfile
#define DEBUG_WIN_NAME
Definition: drawfx.cpp:40
#define STRING_VAR_H(name, val, comment)
Definition: params.h:242
void plot_row_cells(ScrollView *win, ScrollView::Color colour, TO_ROW *row, float xshift, ICOORDELT_LIST *cells)
Definition: drawtord.cpp:397
void draw_occupation(inT32 xleft, inT32 ybottom, inT32 min_y, inT32 max_y, inT32 occupation[], inT32 thresholds[])
Definition: drawtord.cpp:166
void plot_word_decisions(ScrollView *win, inT16 pitch, TO_ROW *row)
Definition: drawtord.cpp:250
Definition: points.h:189
short inT16
Definition: host.h:100
Definition: statistc.h:29
integer coordinate
Definition: points.h:30
void create_todebug_win()
char * to_smdfile
void plot_box_list(ScrollView *win, BLOBNBOX_LIST *list, ScrollView::Color body_colour)
Definition: drawtord.cpp:70
FILE * to_debug
void plot_parallel_row(TO_ROW *row, float gradient, inT32 left, ScrollView::Color colour, FCOORD rotation)
Definition: drawtord.cpp:125
void plot_to_row(TO_ROW *row, ScrollView::Color colour, FCOORD rotation)
Definition: drawtord.cpp:91
void create_to_win(ICOORD page_tr)
Definition: drawtord.cpp:49