Tesseract  3.02
tesseract-ocr/textord/drawtord.h
Go to the documentation of this file.
00001 /**********************************************************************
00002  * File:        drawtord.h  (Formerly drawto.h)
00003  * Description: Draw things to do with textord.
00004  * Author:              Ray Smith
00005  * Created:             Thu Jul 30 15:40:57 BST 1992
00006  *
00007  * (C) Copyright 1992, Hewlett-Packard Ltd.
00008  ** Licensed under the Apache License, Version 2.0 (the "License");
00009  ** you may not use this file except in compliance with the License.
00010  ** You may obtain a copy of the License at
00011  ** http://www.apache.org/licenses/LICENSE-2.0
00012  ** Unless required by applicable law or agreed to in writing, software
00013  ** distributed under the License is distributed on an "AS IS" BASIS,
00014  ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00015  ** See the License for the specific language governing permissions and
00016  ** limitations under the License.
00017  *
00018  **********************************************************************/
00019 
00020 #ifndef           DRAWTORD_H
00021 #define           DRAWTORD_H
00022 
00023 #include          "params.h"
00024 #include          "scrollview.h"
00025 #include          "pitsync1.h"
00026 #include          "blobbox.h"
00027 #include          "notdll.h"
00028 
00029 #define NO_SMD        "none"
00030 
00031 extern BOOL_VAR_H (textord_show_fixed_cuts, FALSE,
00032 "Draw fixed pitch cell boundaries");
00033 extern STRING_VAR_H (to_debugfile, DEBUG_WIN_NAME, "Name of debugfile");
00034 extern STRING_VAR_H (to_smdfile, NO_SMD, "Name of SMD file");
00035 extern ScrollView* to_win;
00036 extern FILE *to_debug;
00037 void create_to_win(                //make features win
00038                    ICOORD page_tr  //size of page
00039                   );
00040 void close_to_win();  //make features win
00041 void create_todebug_win();  //make gradients win
00042 void plot_box_list(                      //make gradients win
00043                    ScrollView* win,           //window to draw in
00044                    BLOBNBOX_LIST *list,  //blob list
00045                    ScrollView::Color body_colour    //colour to draw
00046                   );
00047 void plot_to_row(                 //draw a row
00048                  TO_ROW *row,     //row to draw
00049                  ScrollView::Color colour,   //colour to draw in
00050                  FCOORD rotation  //rotation for line
00051                 );
00052 void plot_parallel_row(                 //draw a row
00053                        TO_ROW *row,     //row to draw
00054                        float gradient,  //gradients of lines
00055                        inT32 left,      //edge of block
00056                        ScrollView::Color colour,   //colour to draw in
00057                        FCOORD rotation  //rotation for line
00058                       );
00059 void draw_occupation (           //draw projection
00060 inT32 xleft,                     //edge of block
00061 inT32 ybottom,                   //bottom of block
00062 inT32 min_y,                     //coordinate limits
00063 inT32 max_y, inT32 occupation[], //projection counts
00064 inT32 thresholds[]               //for drop out
00065 );
00066 void draw_meanlines(                  //draw a block
00067                     TO_BLOCK *block,  //block to draw
00068                     float gradient,   //gradients of lines
00069                     inT32 left,       //edge of block
00070                     ScrollView::Color colour,    //colour to draw in
00071                     FCOORD rotation   //rotation for line
00072                    );
00073 void plot_word_decisions(              //draw words
00074                          ScrollView* win,   //window tro draw in
00075                          inT16 pitch,  //of block
00076                          TO_ROW *row   //row to draw
00077                         );
00078 void plot_fp_cells(                        //draw words
00079                    ScrollView* win,             //window tro draw in
00080                    ScrollView::Color colour,          //colour of lines
00081                    BLOBNBOX_IT *blob_it,   //blobs
00082                    inT16 pitch,            //of block
00083                    inT16 blob_count,       //no of real blobs
00084                    STATS *projection,      //vertical
00085                    inT16 projection_left,  //edges //scale factor
00086                    inT16 projection_right,
00087                    float projection_scale);
00088 void plot_fp_cells2(                        //draw words
00089                     ScrollView* win,             //window tro draw in
00090                     ScrollView::Color colour,          //colour of lines
00091                     TO_ROW *row,            //for location
00092                     FPSEGPT_LIST *seg_list  //segments to plot
00093                    );
00094 void plot_row_cells(                       //draw words
00095                     ScrollView* win,            //window tro draw in
00096                     ScrollView::Color colour,         //colour of lines
00097                     TO_ROW *row,           //for location
00098                     float xshift,          //amount of shift
00099                     ICOORDELT_LIST *cells  //cells to draw
00100                    );
00101 #endif