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