• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /**********************************************************************
2  * File:        tstruct.h  (Formerly tstruct.h)
3  * Description: Code to manipulate the structures of the C++/C interface.
4  * Author:		Ray Smith
5  * Created:		Thu Apr 23 15:49:29 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           TSTRUCT_H
21 #define           TSTRUCT_H
22 
23 #include          "werd.h"
24 #include          "tessclas.h"
25 #include          "ratngs.h"
26 #include          "notdll.h"
27 
28 class FRAGMENT:public ELIST_LINK
29 {
30   public:
FRAGMENT()31     FRAGMENT() {  //constructor
32     }
33     FRAGMENT(EDGEPT *head_pt,   //start
34              EDGEPT *tail_pt);  //end
35 
36     ICOORD head;                 //coords of start
37     ICOORD tail;                 //coords of end
38     EDGEPT *headpt;              //start point
39     EDGEPT *tailpt;              //end point
40 
41     NEWDELETE2 (FRAGMENT)
42 };
43 
44 ELISTIZEH (FRAGMENT)
45 WERD *make_ed_word(                  //construct word
46                    TWERD *tessword,  //word to convert
47                    WERD *clone       //clone this one
48                   );
49 PBLOB *make_ed_blob(                 //construct blob
50                     TBLOB *tessblob  //blob to convert
51                    );
52 OUTLINE *make_ed_outline(                     //constructoutline
53                          FRAGMENT_LIST *list  //list of fragments
54                         );
55 void register_outline(                     //add fragments
56                       TESSLINE *outline,   //tess format
57                       FRAGMENT_LIST *list  //list to add to
58                      );
59 void make_tess_row(                  //make fake row
60                    DENORM *denorm,   //row info
61                    TEXTROW *tessrow  //output row
62                   );
63 TWERD *make_tess_word(              //convert owrd
64                       WERD *word,   //word to do
65                       TEXTROW *row  //fake row
66                      );
67 TBLOB *make_tess_blobs(                      //make tess blobs
68                        PBLOB_LIST *bloblist  //list to convert
69                       );
70 TBLOB *make_rotated_tess_blob(const DENORM* denorm, PBLOB *blob,
71                               BOOL8 flatten);
72 TBLOB *make_tess_blob(               //make tess blob
73                       PBLOB *blob,   //blob to convert
74                       BOOL8 flatten  //flatten outline structure
75                      );
76 TESSLINE *make_tess_outlines(                            //make tess outlines
77                              OUTLINE_LIST *outlinelist,  //list to convert
78                              BOOL8 flatten               //flatten outline structure
79                             );
80 EDGEPT *make_tess_edgepts(                          //make tess edgepts
81                           POLYPT_LIST *edgeptlist,  //list to convert
82                           TPOINT &tl,               //bounding box
83                           TPOINT &br);
84 #endif
85