00001 00020 #ifndef SPLIT_H 00021 #define SPLIT_H 00022 00023 /*---------------------------------------------------------------------- 00024 I n c l u d e s 00025 ----------------------------------------------------------------------*/ 00026 #include "tessclas.h" 00027 #include "oldlist.h" 00028 00029 /*---------------------------------------------------------------------- 00030 T y p e s 00031 ----------------------------------------------------------------------*/ 00040 typedef struct split_record 00041 { 00042 EDGEPT *point1; 00043 EDGEPT *point2; 00044 } SPLIT; 00045 00050 typedef LIST SPLITS; 00051 00052 /*---------------------------------------------------------------------- 00053 V a r i a b l e s 00054 ----------------------------------------------------------------------*/ 00055 extern int display_splits; 00056 00057 /*---------------------------------------------------------------------- 00058 M a c r o s 00059 ----------------------------------------------------------------------*/ 00060 /* ================== */ 00065 #define clone_split(dest,source) \ 00066 if (source) \ 00067 (dest) = new_split ((source)->point1, (source)->point2); \ 00068 else \ 00069 (dest) = (SPLIT*) NULL \ 00070 00071 00072 /*---------------------------------------------------------------------- 00073 F u n c t i o n s 00074 ----------------------------------------------------------------------*/ 00075 void init_splitter_vars(); 00076 00077 void delete_split(SPLIT *split); 00078 00079 EDGEPT *make_edgept(int x, int y, EDGEPT *next, EDGEPT *prev); 00080 00081 SPLIT *new_split(EDGEPT *point1, EDGEPT *point2); 00082 00083 void print_split(SPLIT *split); 00084 00085 void split_outline(EDGEPT *join_point1, EDGEPT *join_point2); 00086 00087 void unsplit_outlines(EDGEPT *p1, EDGEPT *p2); 00088 00089 /* 00090 #if defined(__STDC__) || defined(__cplusplus) 00091 # define _ARGS(s) s 00092 #else 00093 # define _ARGS(s) () 00094 #endif*/ 00095 00096 /* split.c 00097 void init_splitter_vars 00098 _ARGS((void)); 00099 00100 void delete_split 00101 _ARGS((SPLIT *split)); 00102 00103 SPLIT *new_split 00104 _ARGS((EDGEPT *point1, 00105 EDGEPT *point2)); 00106 00107 void print_split 00108 _ARGS((SPLIT *split)); 00109 00110 void split_outline 00111 _ARGS((EDGEPT *join_point1, 00112 EDGEPT *join_point2)); 00113 00114 void unsplit_outlines 00115 _ARGS((EDGEPT *p1, 00116 EDGEPT *p2)); 00117 00118 #undef _ARGS 00119 */ 00120 #endif