tesseract  4.0.0-1-g2a2b
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 "params.h"
23 #include "scrollview.h"
24 #include "pitsync1.h"
25 #include "blobbox.h"
26 
27 #define NO_SMD "none"
28 
30 "Draw fixed pitch cell boundaries");
31 extern STRING_VAR_H (to_debugfile, DEBUG_WIN_NAME, "Name of debugfile");
32 extern STRING_VAR_H (to_smdfile, NO_SMD, "Name of SMD file");
33 extern ScrollView* to_win;
34 extern FILE *to_debug;
35 // Creates a static display window for textord, and returns a pointer to it.
37 void close_to_win(); // Destroy the textord window.
38 void create_todebug_win(); //make gradients win
39 void plot_box_list( //make gradients win
40  ScrollView* win, //window to draw in
41  BLOBNBOX_LIST *list, //blob list
42  ScrollView::Color body_colour //colour to draw
43  );
44 void plot_to_row( //draw a row
45  TO_ROW *row, //row to draw
46  ScrollView::Color colour, //colour to draw in
47  FCOORD rotation //rotation for line
48  );
49 void plot_parallel_row( //draw a row
50  TO_ROW *row, //row to draw
51  float gradient, //gradients of lines
52  int32_t left, //edge of block
53  ScrollView::Color colour, //colour to draw in
54  FCOORD rotation //rotation for line
55  );
56 void draw_occupation ( //draw projection
57 int32_t xleft, //edge of block
58 int32_t ybottom, //bottom of block
59 int32_t min_y, //coordinate limits
60 int32_t max_y, int32_t occupation[], //projection counts
61 int32_t thresholds[] //for drop out
62 );
63 void draw_meanlines( //draw a block
64  TO_BLOCK *block, //block to draw
65  float gradient, //gradients of lines
66  int32_t left, //edge of block
67  ScrollView::Color colour, //colour to draw in
68  FCOORD rotation //rotation for line
69  );
70 void plot_word_decisions( //draw words
71  ScrollView* win, //window tro draw in
72  int16_t pitch, //of block
73  TO_ROW *row //row to draw
74  );
75 void plot_fp_cells( //draw words
76  ScrollView* win, //window tro draw in
77  ScrollView::Color colour, //colour of lines
78  BLOBNBOX_IT *blob_it, //blobs
79  int16_t pitch, //of block
80  int16_t blob_count, //no of real blobs
81  STATS *projection, //vertical
82  int16_t projection_left, //edges //scale factor
83  int16_t projection_right,
84  float projection_scale);
85 void plot_fp_cells2( //draw words
86  ScrollView* win, //window tro draw in
87  ScrollView::Color colour, //colour of lines
88  TO_ROW *row, //for location
89  FPSEGPT_LIST *seg_list //segments to plot
90  );
91 void plot_row_cells( //draw words
92  ScrollView* win, //window tro draw in
93  ScrollView::Color colour, //colour of lines
94  TO_ROW *row, //for location
95  float xshift, //amount of shift
96  ICOORDELT_LIST *cells //cells to draw
97  );
98 #endif
#define BOOL_VAR_H(name, val, comment)
Definition: params.h:267
char * to_smdfile
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:165
void draw_meanlines(TO_BLOCK *block, float gradient, int32_t left, ScrollView::Color colour, FCOORD rotation)
Definition: drawtord.cpp:209
#define STRING_VAR_H(name, val, comment)
Definition: params.h:270
Definition: statistc.h:33
void plot_box_list(ScrollView *win, BLOBNBOX_LIST *list, ScrollView::Color body_colour)
Definition: drawtord.cpp:69
FILE * to_debug
bool textord_show_fixed_cuts
Definition: drawtord.cpp:35
ScrollView * create_to_win(ICOORD page_tr)
Definition: drawtord.cpp:46
void create_todebug_win()
void plot_row_cells(ScrollView *win, ScrollView::Color colour, TO_ROW *row, float xshift, ICOORDELT_LIST *cells)
Definition: drawtord.cpp:396
integer coordinate
Definition: points.h:32
#define FALSE
Definition: capi.h:52
void plot_word_decisions(ScrollView *win, int16_t pitch, TO_ROW *row)
Definition: drawtord.cpp:249
void close_to_win()
Definition: drawtord.cpp:55
void plot_to_row(TO_ROW *row, ScrollView::Color colour, FCOORD rotation)
Definition: drawtord.cpp:90
void plot_fp_cells2(ScrollView *win, ScrollView::Color colour, TO_ROW *row, FPSEGPT_LIST *seg_list)
Definition: drawtord.cpp:363
ScrollView * to_win
Definition: drawtord.cpp:37
#define NO_SMD
Definition: drawtord.h:27
Definition: points.h:189
void plot_parallel_row(TO_ROW *row, float gradient, int32_t left, ScrollView::Color colour, FCOORD rotation)
Definition: drawtord.cpp:124
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:319
char * to_debugfile
#define DEBUG_WIN_NAME
Definition: drawfx.cpp:37