Tesseract  3.02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
split.h
Go to the documentation of this file.
1 /* -*-C-*-
2  ********************************************************************************
3  *
4  * File: split.h (Formerly split.h)
5  * Description:
6  * Author: Mark Seaman, SW Productivity
7  * Created: Fri Oct 16 14:37:00 1987
8  * Modified: Mon May 13 10:49:23 1991 (Mark Seaman) marks@hpgrlt
9  * Language: C
10  * Package: N/A
11  * Status: Reusable Software Component
12  *
13  * (c) Copyright 1987, Hewlett-Packard Company.
14  ** Licensed under the Apache License, Version 2.0 (the "License");
15  ** you may not use this file except in compliance with the License.
16  ** You may obtain a copy of the License at
17  ** http://www.apache.org/licenses/LICENSE-2.0
18  ** Unless required by applicable law or agreed to in writing, software
19  ** distributed under the License is distributed on an "AS IS" BASIS,
20  ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21  ** See the License for the specific language governing permissions and
22  ** limitations under the License.
23  *
24  *****************************************************************************/
25 #ifndef SPLIT_H
26 #define SPLIT_H
27 
28 /*----------------------------------------------------------------------
29  I n c l u d e s
30 ----------------------------------------------------------------------*/
31 #include "blobs.h"
32 #include "oldlist.h"
33 
34 /*----------------------------------------------------------------------
35  T y p e s
36 ----------------------------------------------------------------------*/
37 typedef struct split_record
38 { /* SPLIT */
41 } SPLIT;
42 
43 typedef LIST SPLITS; /* SPLITS */
44 
45 /*----------------------------------------------------------------------
46  V a r i a b l e s
47 ----------------------------------------------------------------------*/
48 
49 extern BOOL_VAR_H(wordrec_display_splits, 0, "Display splits");
50 
51 /*----------------------------------------------------------------------
52  M a c r o s
53 ----------------------------------------------------------------------*/
54 /**********************************************************************
55  * clone_split
56  *
57  * Create a new split record and set the contents equal to the contents
58  * of this record.
59  **********************************************************************/
60 
61 #define clone_split(dest,source) \
62 if (source) \
63  (dest) = new_split ((source)->point1, (source)->point2); \
64 else \
65  (dest) = (SPLIT*) NULL \
66 
67 
68 /*----------------------------------------------------------------------
69  F u n c t i o n s
70 ----------------------------------------------------------------------*/
71 void delete_split(SPLIT *split);
72 
73 EDGEPT *make_edgept(int x, int y, EDGEPT *next, EDGEPT *prev);
74 
75 void remove_edgept(EDGEPT *point);
76 
77 SPLIT *new_split(EDGEPT *point1, EDGEPT *point2);
78 
79 void print_split(SPLIT *split);
80 
81 void split_outline(EDGEPT *join_point1, EDGEPT *join_point2);
82 
83 void unsplit_outlines(EDGEPT *p1, EDGEPT *p2);
84 
85 #endif