Tesseract  3.02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
makechop.h
Go to the documentation of this file.
1 /* -*-C-*-
2  ********************************************************************************
3  *
4  * File: makechop.h (Formerly makechop.h)
5  * Description:
6  * Author: Mark Seaman, SW Productivity
7  * Created: Fri Oct 16 14:37:00 1987
8  * Modified: Mon Jul 29 13:33: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 MAKECHOP_H
26 #define MAKECHOP_H
27 
28 /*----------------------------------------------------------------------
29  I n c l u d e s
30 ----------------------------------------------------------------------*/
31 #include "chop.h"
32 #include "olutil.h"
33 
34 /*----------------------------------------------------------------------
35  M a c r o s
36 ---------------------------------------------------------------------*/
37 /**********************************************************************
38  * is_split_outline
39  *
40  * Check to see if both sides of the split fall within the bounding
41  * box of this outline.
42  **********************************************************************/
43 
44 #define is_split_outline(outline,split) \
45 (outline->Contains(split->point1->pos) && \
46  outline->Contains(split->point2->pos)) \
47 
48 
49 /*----------------------------------------------------------------------
50  Public Function Prototypes
51 ----------------------------------------------------------------------*/
52 void apply_seam(TBLOB *blob, TBLOB *other_blob, bool italic_blob, SEAM *seam);
53 
54 void form_two_blobs(TBLOB *blob, TBLOB *other_blob, bool italic_blob,
55  const TPOINT& location);
56 
57 void make_double_split(TBLOB *blob, TBLOB *other_blob, bool italic_blob,
58  SEAM *seam);
59 
60 void make_single_split(TESSLINE *outlines, SPLIT *split);
61 
62 void make_split_blobs(TBLOB *blob, TBLOB *other_blob, bool italic_blob,
63  SEAM *seam);
64 
65 void make_triple_split(TBLOB *blob, TBLOB *other_blob, bool italic_blob,
66  SEAM *seam);
67 
68 void undo_seam(TBLOB *blob, TBLOB *other_blob, SEAM *seam);
69 
70 void undo_single_split(TBLOB *blob, SPLIT *split);
71 #endif