30 #define MINEDGELENGTH 8 // min decent length
41 C_OUTLINE_IT* outline_it) {
53 outline =
new C_OUTLINE (start, botleft, topright, looplength);
55 outline_it->add_after_then_move (outline);
78 const ERRCODE ED_ILLEGAL_SUM =
"Illegal sum of chain codes";
86 if (edgept->
stepdir != lastchain) {
88 chaindiff = edgept->
stepdir - lastchain;
91 else if (chaindiff < -2)
93 chainsum += chaindiff;
96 edgept = edgept->
next;
100 if ((chainsum != 4 && chainsum != -4)
102 if (edgept != start) {
107 ED_ILLEGAL_SUM.
error (
"check_path_legal",
TESSLOG,
"chainsum=%d",
134 leftmost = edgept->
pos.
x ();
137 edgept = edgept->
next;
138 if (edgept->
pos.
x () < botleft.
x ())
141 else if (edgept->
pos.
x () > topright.
x ())
143 if (edgept->
pos.
y () < botleft.
y ())
146 else if (edgept->
pos.
y () > topright.
y ()) {
148 leftmost = edgept->
pos.
x ();
151 else if (edgept->
pos.
y () == topright.
y ()
152 && edgept->
pos.
x () < leftmost) {
154 leftmost = edgept->
pos.
x ();
159 while (edgept != start);
inT16 x() const
access function
ScrollView::Color check_path_legal(CRACKEDGE *start)
inT16 y() const
access_function
#define INT_VAR(name, val, comment)
void set_y(inT16 yin)
rewrite function
void error(const char *caller, TessErrorLogCode action, const char *format,...) const
void complete_edge(CRACKEDGE *start, C_OUTLINE_IT *outline_it)
void set_x(inT16 xin)
rewrite function
inT16 loop_bounding_box(CRACKEDGE *&start, ICOORD &botleft, ICOORD &topright)