00001 /* -*-C-*- 00002 ******************************************************************************** 00003 * 00004 * File: chopper.h (Formerly chopper.h) 00005 * Description: 00006 * Author: Mark Seaman, SW Productivity 00007 * Created: Fri Oct 16 14:37:00 1987 00008 * Modified: Wed May 15 14:24:26 1991 (Mark Seaman) marks@hpgrlt 00009 * Language: C 00010 * Package: N/A 00011 * Status: Reusable Software Component 00012 * 00013 * (c) Copyright 1987, Hewlett-Packard Company. 00014 ** Licensed under the Apache License, Version 2.0 (the "License"); 00015 ** you may not use this file except in compliance with the License. 00016 ** You may obtain a copy of the License at 00017 ** http://www.apache.org/licenses/LICENSE-2.0 00018 ** Unless required by applicable law or agreed to in writing, software 00019 ** distributed under the License is distributed on an "AS IS" BASIS, 00020 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00021 ** See the License for the specific language governing permissions and 00022 ** limitations under the License. 00023 * 00024 *********************************************************************************/ 00025 00026 #ifndef CHOPPER_H 00027 #define CHOPPER_H 00028 00029 /*---------------------------------------------------------------------- 00030 I n c l u d e s 00031 ----------------------------------------------------------------------*/ 00032 #include "cutil.h" 00033 #include "matrix.h" 00034 #include "seam.h" 00035 #include "states.h" 00036 #include "stopper.h" 00037 00038 /*--------------------------------------------------------------------------- 00039 Variables 00040 ---------------------------------------------------------------------------*/ 00041 00042 extern BOOL_VAR_H (fragments_guide_chopper, FALSE, 00043 "Use information from fragments to guide chopping process"); 00044 00045 00046 /*---------------------------------------------------------------------- 00047 F u n c t i o n s 00048 ----------------------------------------------------------------------*/ 00049 void preserve_outline(EDGEPT *start); 00050 00051 void preserve_outline_tree(TESSLINE *srcline); 00052 00053 EDGEPT *restore_outline(EDGEPT *start); 00054 00055 void restore_outline_tree(TESSLINE *srcline); 00056 00057 SEAM *attempt_blob_chop(TWERD *word, inT32 blob_number, SEAMS seam_list); 00058 00059 int any_shared_split_points(SEAMS seam_list, SEAM *seam); 00060 00061 int check_blob(TBLOB *blob); 00062 00063 inT16 check_seam_order(TBLOB *blob, SEAM *seam); 00064 00065 SEAMS start_seam_list(TBLOB *blobs); 00066 00067 inT16 total_containment(TBLOB *blob1, TBLOB *blob2); 00068 #endif