tesseract 4.1.1
Loading...
Searching...
No Matches
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");
31extern STRING_VAR_H (to_debugfile, DEBUG_WIN_NAME, "Name of debugfile");
32extern STRING_VAR_H (to_smdfile, NO_SMD, "Name of SMD file");
33extern ScrollView* to_win;
34extern FILE *to_debug;
35// Creates a static display window for textord, and returns a pointer to it.
37void close_to_win(); // Destroy the textord window.
38void create_todebug_win(); //make gradients win
39void 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 );
44void 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 );
49void 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 );
56void draw_occupation ( //draw projection
57int32_t xleft, //edge of block
58int32_t ybottom, //bottom of block
59int32_t min_y, //coordinate limits
60int32_t max_y, int32_t occupation[], //projection counts
61int32_t thresholds[] //for drop out
62);
63void 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 );
70void 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 );
75void 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);
85void 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 );
91void 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:297
#define STRING_VAR_H(name, val, comment)
Definition: params.h:299
void plot_fp_cells2(ScrollView *win, ScrollView::Color colour, TO_ROW *row, FPSEGPT_LIST *seg_list)
Definition: drawtord.cpp:361
void create_todebug_win()
void plot_row_cells(ScrollView *win, ScrollView::Color colour, TO_ROW *row, float xshift, ICOORDELT_LIST *cells)
Definition: drawtord.cpp:394
ScrollView * to_win
Definition: drawtord.cpp:35
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:163
void draw_meanlines(TO_BLOCK *block, float gradient, int32_t left, ScrollView::Color colour, FCOORD rotation)
Definition: drawtord.cpp:207
#define NO_SMD
Definition: drawtord.h:27
void plot_parallel_row(TO_ROW *row, float gradient, int32_t left, ScrollView::Color colour, FCOORD rotation)
Definition: drawtord.cpp:122
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:317
void plot_box_list(ScrollView *win, BLOBNBOX_LIST *list, ScrollView::Color body_colour)
Definition: drawtord.cpp:67
void plot_word_decisions(ScrollView *win, int16_t pitch, TO_ROW *row)
Definition: drawtord.cpp:247
char * to_debugfile
FILE * to_debug
void plot_to_row(TO_ROW *row, ScrollView::Color colour, FCOORD rotation)
Definition: drawtord.cpp:88
void close_to_win()
Definition: drawtord.cpp:53
ScrollView * create_to_win(ICOORD page_tr)
Definition: drawtord.cpp:44
char * to_smdfile
bool textord_show_fixed_cuts
Definition: drawtord.cpp:33
#define DEBUG_WIN_NAME
Definition: drawfx.cpp:36
integer coordinate
Definition: points.h:32
Definition: points.h:189
Definition: statistc.h:31